我正在测试一个使用Spark Streaming实时提取推文的脚本。这些推文应该被加载到IBM BigInsights hdfs环境中。该脚本是用python编写的,我使用yarn进行集群管理。
它在我的本地独立环境中正常运行但是当我使用
运行代码时spark-submit --master yarn-cluster <name_of_script.py>
在我的BigInsights服务器上,它出现以下错误:
error: [Errno 111] Connection refused
ERROR:py4j.java_gateway:An error occurred while trying to connect to the Java server
Traceback (most recent call last):
File "/data/hadoop-swap/yarn/local/usercache/prtbhd/appcache/application_1497088854141_0001/container_1497088854141_0001_01_000001/py4j-0.9-src.zip/py4j/java_gateway.py", line 690, in start
self.socket.connect((self.address, self.port))
File "<string>", line 1, in connect
有关为什么会出现此错误以及如何解决此问题的任何想法?