How do I pass program-argument to main function in running spark-submit with a JAR?

后端 未结 4 829
悲哀的现实
悲哀的现实 2020-12-29 05:28

I know this is a trivial question, but I could not find the answer on the internet.

I am trying to run a Java class with the main function with program

4条回答
  •  隐瞒了意图╮
    2020-12-29 06:25

    The first unrecognized argument is treated as the primaryResource (jar file in our case). Checkout SparkSubmitArguments.handleUnknown

    All the arguments after the primaryResource as treated as arguments to the application. Checkout SparkSubmitArguments.handleExtraArgs

    To better understand how the arguments are parsed, checkout SparkSubmitOptionParser.parse. The above 2 methods are called from this method

提交回复
热议问题