如何在DataProc UI上指定多个jar文件(我的意思是在Web浏览器上)。例如,在命令行中,我可以按以下方式启动作业:
export SPARK_MASTER=local[8]
export DEPENDENCIES=/home/xxx/.ivy2/cache/org.apache.bahir/spark-streaming-twitter_2.11/jars/spark-streaming-twitter_2.11-2.0.1.jar,/home/xxx/.ivy2/cache/org.twitter4j/twitter4j-core/jars/twitter4j-core-4.0.4.jar,/home/xxx/.ivy2/cache/org.twitter4j/twitter4j-stream/jars/twitter4j-stream-4.0.4.jar
/usr/bin/spark-submit \
--master $SPARK_MASTER \
--jars $DEPENDENCIES \
--class me.baghino.spark.streaming.twitter.example.TwitterSentimentScore \
target/scala-2.11/spark-twitter-stream-example_2.11-1.0.0.jar
我将所有这些文件复制到Google Storage上的存储桶中,然后在 Jar文件下输入:
gs://mybucket/testdata/spark-twitter-stream-example_2.11-1.0.0.jar:gs://mybucket/testdata/spark-streaming-twitter_2.11-2.0.1.jar:gs://mybucket/testdata/twitter4j-core-4.0.4.jar:gs://mybucket/testdata/twitter4j-stream-4.0.4.jar
还尝试使用逗号:
gs://mybucket/testdata/spark-twitter-stream-example_2.11-1.0.0.jar,gs://mybucket/testdata/spark-streaming-twitter_2.11-2.0.1.jar,gs://mybucket/testdata/twitter4j-core-4.0.4.jar,gs://mybucket/testdata/twitter4j-stream-4.0.4.jar
我还尝试在参数下添加-jars 。那也不起作用。