我正在用Scala编写一个Spark作业,需要通过命令行以JSON文件格式发送一些参数,如应用程序名称、主变量和更多变量。
./bin/spark-submit --name "My app" --master local[4] --conf spark.eventLog.enabled=false --conf "spark.executor.extraJavaOptions=-XX:+PrintGCDetails -XX:+PrintGCTimeStamps" myApp.jar我需要在一个JSON文件中发送应用程序名称、主文件和所有参数,如下所示:
$SPARK_HOME/bin/spark-submit --properties-file property.conf这有可能吗?多么?谁能用一个简单的例子来解释一下?
发布于 2017-07-06 16:30:10
您可以使用--jars选项,如下所示:
$SPARK_HOME/bin/spark-submit --jars property.conf --class your.Class your.jarspark-submit的帮助页面会告诉你更多:
$SPARK_HOME/bin/spark-submit --help
--jars JARS Comma-separated list of local jars to include on the driver
and executor classpaths.除了名称之外,您还可以使用它在驱动程序和执行器的类路径中移动您想要的配置文件。
https://stackoverflow.com/questions/44943498
复制相似问题