Hadoop:操作-copyFromLocal期间出错

时间:2013-09-24 08:56:58

标签: hadoop bigdata

您好,我在尝试在Hadoop上执行-copyFromLocal命令时收到以下错误。 任何人都可以通过建议解决方案来解决这个问题吗?

 hadoop dfs -copyFromLocal /tmp/AReport.txt /user/
13/09/24 19:42:38 WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/AReport.txt could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1417)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:596)
        at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:523)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1383)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1379)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1377)

以下是报告详情。

 $HADOOP_HOME/bin/hadoop dfsadmin -report
    Configured Capacity: 0 (0 KB)
    Present Capacity: 0 (0 KB)
    DFS Remaining: 0 (0 KB)
    DFS Used: 0 (0 KB)
    DFS Used%: ?%
    Under replicated blocks: 0
    Blocks with corrupt replicas: 0
    Missing blocks: 0

    -------------------------------------------------
    Datanodes available: 0 (0 total, 0 dead)

2 个答案:

答案 0 :(得分:1)

使用hadoop datanode -starthadoop datanode -rollback

答案 1 :(得分:0)

可以找到问题的解决方案..

所有数据节点都已关闭。删除节点上的tmp文件给出了解决方案..