spark submit failed with spark streaming workdcount python code

时光总嘲笑我的痴心妄想 提交于 2019-12-04 19:25:12

Actually I just realized you have included the --jars after the script. The jar files will not be included unless the jars are specified before the script name. So use spark-submit --jars spark-streaming-kafka-assembly_2.10-1.3.1.jar Script.py instead of spark-submit Script.py --jars spark-streaming-kafka-assembly_2.10-1.3.1.jar.

I had to reference a number of jars in my command to get this to work, Maybe try reference the jars explicitly, it might not be picking it up correctly from the jar you built.

                /opt/spark/spark-1.3.1-bin-hadoop2.6/bin/spark-submit --jars /root/spark-streaming-kafka_2.10-1.3.1.jar,/usr/hdp/2.2.4.2-2/kafka/libs/kafka_2.10-0.8.1.2.2.4.2-2.jar,/usr/hdp/2.2.4.2-2/kafka/libs/zkclient-0.3.jar,/root/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar  kafka_wordcount.py kafkaAddress:2181 topicName     

Actually It looks like its not picking up this jar : kafka_2.10-0.8.1.2.2.4.2-2.jar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!