将文件从linux本地文件系统复制到HDFS时出错

时间:2014-07-08 11:30:49

标签: linux hadoop hdfs

它的单节点群集,而我开始没有遇到任何问题,我也为所有守护进程打了日志。

但是,虽然我将数据从我的本地linux文件系统复制到HDFS文件系统,但却抛出异常说法; org.apache.hadoop.hdfs.DFSClient:DataStreamer异常:java.lang.IllegalArgumentException:不包含有效的host:port authority:0:0:0:0:0:0:0:1:50010

请查看随附的日志;

 2014-07-08 15:56:28,342 WARN org.apache.hadoop.hdfs.DFSClient: DataStreamer Exception: java.lang.IllegalArgumentException: Does not contain a valid host:port authority: 0:0:0:0:0:0:0:1:50010
    at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:164)
    at org.apache.hadoop.net.NetUtils.createSocketAddr(NetUtils.java:130)
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.createBlockOutputStream(DFSClient.java:3629)
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:3588)
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2600(DFSClient.java:2783)
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:3023)

2014-07-08 15:56:28,342 WARN org.apache.hadoop.hdfs.DFSClient: Error Recovery for blk_3686864267613252482_3024 bad datanode[0] nodes == null
2014-07-08 15:56:28,342 WARN org.apache.hadoop.hdfs.DFSClient: Could not get block locations. Source file "/tmp/hadoop-user1/mapred/system/jobtracker.info" - Aborting...
2014-07-08 15:56:28,342 WARN org.apache.hadoop.mapred.JobTracker: Writing to file hdfs://localhost:9000/tmp/hadoop-user1/mapred/system/jobtracker.info failed!
2014-07-08 15:56:28,343 WARN org.apache.hadoop.mapred.JobTracker: FileSystem is not ready yet!
2014-07-08 15:56:28,351 WARN org.apache.hadoop.mapred.JobTracker: Failed to initialize recovery manager. 
java.io.IOException: Could not get block locations. Source file "/tmp/hadoop-user1/mapred/system/jobtracker.info" - Aborting...
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.processDatanodeError(DFSClient.java:3270)
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2200(DFSClient.java:2783)
    at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2987)
2014-07-08 15:56:29,352 WARN org.apache.hadoop.mapred.JobTracker: Retrying...

1 个答案:

答案 0 :(得分:0)

检查您的mapred-site.xml。它应该有有效的跟踪器条目。当然应根据您的系统更改主机和端口值。

<property>
  <name>mapred.job.tracker</name>
  <value>host:port</value>
</property>