问题:EclipseHadoop插件问题(对localhost/127.0.0.1:50070的调用在本地异常上失败:java.io.eofexception)。有人能给我解决这个问题的办法吗?
我正在进行cloudera培训教程。它使用eclipse(helios)3.6和hadoop.0.20.2-cdh3u2版本。
我下载了hadoop-eclipse-plugin-0.20.3-snapshot.jar,并将其复制到/home/training/eclipse/plugins/文件夹中。
Run --> Eclipse --> gone to File (which is in Menu bar) --> New --> other
从其他项目中选择mapreduce项目。我选择了指定hadoop库位置。并指定位置为“/usr/lib/hadoop”。在这个地方我有下面的文件。
bin hadoop-examples-0.20.2-cdh3u2.jar
build.xml hadoop-examples.jar
CHANGES.txt hadoop-test-0.20.2-cdh3u2.jar
conf hadoop-test.jar
contrib hadoop-tools-0.20.2-cdh3u2.jar
example-confs hadoop-tools.jar
hadoop-0.20.2-cdh3u2-ant.jar ivy
hadoop-0.20.2-cdh3u2-core.jar ivy.xml
hadoop-0.20.2-cdh3u2-examples.jar lib
hadoop-0.20.2-cdh3u2-test.jar LICENSE.txt
hadoop-0.20.2-cdh3u2-tools.jar logs
hadoop-ant-0.20.2-cdh3u2.jar NOTICE.txt
hadoop-ant.jar pids
hadoop-core-0.20.2-cdh3u2.jar README.txt
hadoop-core.jar webapps
将mpareduce项目命名为“myhadoop”,并单击finish按钮。我在dfs的位置按钮得到了mapreduce按钮,但不是hirearchy。
去检查我的dfs和Map端口。
我的core-site.xml是
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
</property>
我的mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:8021</value>
</property>
在map reto中定义hadoop在eclipse中的位置,我给出了如下信息。
Map/Reduce Master
Host: localhost
port 50021
DFS Master:
Host :localhost
Port:50020
同时选择使用m/r主机。
我运行了cloudera的示例wordcount程序,但它给了我以下问题。请给我的解决方案,我正在尝试从2天。,。。。。
Exception in thread "main" java.io.IOException: Call to localhost/127.0.0.1:50070 failed on local exception: java.io.EOFException
at org.apache.hadoop.ipc.Client.wrapException(Client.java:1142)
at org.apache.hadoop.ipc.Client.call(Client.java:1110)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:226)
at $Proxy0.getProtocolVersion(Unknown Source)
at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:398)
at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:384)
at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:111)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:213)
at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:180)
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:89)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1514)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:67)
at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:1548)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1530)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:228)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:111)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:212)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:183)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.addInputPath(FileInputFormat.java:368)
at WordCount.main(WordCount.java:65)
Caused by: java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:375)
at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:815)
at org.apache.hadoop.ipc.Client$Connection.run(Client.java:724)
1条答案
按热度按时间czq61nw11#
尝试将配置中的计算机名从localhost更改为hostname