hadoop - Spark I/O error constructing remote block -
i want create home-made spark cluster 2 computer in same network. setup following:
a) 192.168.1.9 spark master hadoop hdfs installed
hadoop has core-site.xml
<configuration> <property> <name>hadoop.tmp.dir</name> <value>/app/hadoop/tmp</value> </property> <property> <name>fs.defaultfs</name> <value>hdfs://0.0.0.0:9000</value> </property> </configuration>
b) 192.168.1.6 spark (slave)
from b want access file in a's hadoop hdfs using spark command:
... # load files file_1 = "input_1.pkl" file_2 = "input_2.pkl" hdfs_base_path = "hdfs://192.168.1.9:9000/folderx/" sc.addfile(hdfs_base_path + file_1) sc.addfile(hdfs_base_path + file_2) # files open(sparkfiles.get(file_1), 'rb') fw: // use fw
however, if want test program in b, when execute program in b using command:
./spark-submit --master local program.py
the output following:
17/07/25 19:02:51 info sparkcontext: added file hdfs://192.168.1.9:9000/bigdata/input_1_new_grid.pkl @ hdfs://192.168.1.9:9000/bigdata/input_1_new_grid.pkl timestamp 1501002171301 17/07/25 19:02:51 info utils: fetching hdfs://192.168.1.9:9000/bigdata/input_1_new_grid.pkl /tmp/spark-838c3774-36ec-4db1-ab01-a8a8c627b100/userfiles-b4973f80-be6e-4f2e-8ba1-cd64ddca369a/fetchfiletemp1979399086141127743.tmp 17/07/25 19:02:51 warn blockreaderfactory: i/o error constructing remote block reader. java.net.connectexception: connection refused @ sun.nio.ch.socketchannelimpl.checkconnect(native method) @ sun.nio.ch.socketchannelimpl.finishconnect(socketchannelimpl.java:717)
and later:
17/07/25 19:02:51 warn dfsclient: failed connect /127.0.0.1:50010 block, add deadnodes , continue. java.net.connectexception: connection refused java.net.connectexception: connection refused @ sun.nio.ch.socketchannelimpl.checkconnect(native method)
the program tries access 127.0.0.1:50010, , wrong. should install hadoop in b? if not necessary, correct configuration? thank you!
Comments
Post a Comment