错误消息:
error storage.shuffleblockfetcheriterator:无法从wn2 java.io获取块。ioexception:无法连接到wn2
原因:io.netty.channel.abstractchannel$annotatedConnectionException:连接被拒绝:wn-2/wn-2 ipadress:34261 caused by:java.net.connectexception:连接被拒绝
使用的配置:
conf = spark.sparkContext._conf.setAll([ ('spark.app.name', 'test'),
('spark.executor.memory', '20g'),
('spark.executor.cores', '4'),
('spark.executor.instances', '1'), # fails when instances are 2
('spark.driver.memory','7g')
])
伪代码:
df = spark.read.json("file from hdfs")
df.printSchema()
df.show(2)
df.count() # Failing here
在具有1个namenode、2个datanodes和yarn作为rm的集群上运行上述代码。当用一个执行器运行上面的spark代码时,它给了我Dataframe中的记录数(120万条)。但是当执行器增加到2时,每个工作节点中有一个执行器,我就得到了上述错误。我认为这是工作节点1和工作节点2之间的连接问题,工作节点1试图从工作节点2获取一些块,这导致了问题。有什么建议可以纠正这个错误吗?先谢谢你。
暂无答案!
目前还没有任何答案,快来回答吧!