专栏首页让技术和时代并行could only be replicated to 0 nodes, instead of 1

could only be replicated to 0 nodes, instead of 1

 WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /input/LICENSE.txt could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1920)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:783)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        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:587)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
        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:1190)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)

        at org.apache.hadoop.ipc.Client.call(Client.java:1113)
        at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
        at $Proxy1.addBlock(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62)
        at $Proxy1.addBlock(Unknown Source)
        at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.locateFollowingBlock(DFSClient.java:3720)
        at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:3580)
        at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2600(DFSClient.java:2783)
        at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:3023)

出现 这种异常是因为数据冲突造成的,可以把通过日志查看,解决办法:删掉tmp文件夹下生成的dfs文件,重新format一下,问题解决。

我的日志如下:通过日志进行删除:

2014-07-29 11:54:34,021 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:  /************************************************************ STARTUP_MSG: Starting DataNode STARTUP_MSG:   host = qa-lamp/10.110.30.30 STARTUP_MSG:   args = [] STARTUP_MSG:   version = 1.2.1 STARTUP_MSG:   build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1503152; compiled by 'mattf' on Mon Jul 22 15:23:09 PDT 2013 STARTUP_MSG:   java = 1.6.0_32 ************************************************************/ 2014-07-29 11:54:34,197 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties 2014-07-29 11:54:34,209 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered. 2014-07-29 11:54:34,210 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s). 2014-07-29 11:54:34,210 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started 2014-07-29 11:54:34,315 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered. 2014-07-29 11:54:34,716 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs in /export/hadoop/tmp/dfs/data: namenode namespaceID = 1408593158; datanode namespaceID = 1322143693 at org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition(DataStorage.java:232) at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:147) at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:414) at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:321) at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1712) at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1651) at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1669) at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1795) at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1812)

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 用java程序把本地的一个文件拷贝到hdfs上并显示进度

    把程序打成jar包放到Linux上 转到目录下执行命令 hadoop jar mapreducer.jar /home/c...

    用户5166556
  • mysql中load data Infile运用

    速度比insert要快20倍。共享一下java程序操作。

    用户5166556
  • hadoop出现ava.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException

    到你的下载的hadoop所在版本的lib包中引入jackson-core-asl-1.8.8.jar   和   jackson-mapper-asl-1.8...

    用户5166556
  • hbase_异常_05_End of File Exception between local host is: "rayner/127.0.1.1"; destination host is: "l

    ERROR master.HMasterCommandLine: Master not running

    shirayner
  • 运行wordcount时显示Could not obtain block

    该文章接上面hadoop运行wordcount时卡住不动,接着下面 hadoop@ubuntu118:~/hadoop-1.0.2$ bi...

    闵开慧
  • Windows启动HDFS报错 - org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z

    Windows 7 环境下启动 HDFS,执行 start-dfs.cmd 出现 org.apache.hadoop.io.nativeio.NativeIO$...

    夹胡碰
  • Hmaster无法启动

    启动hbase时问题列表: 1 查看hbase-hadoop-master-ubuntu118.log,发现其中的错误为 2012-09-02 22:59:58...

    闵开慧
  • ERROR: org.apache.hadoop.hbase.MasterNotRunnin...

     ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 times 这是为什么...

    闵开慧
  • Flink 连接 hive 解决 java.net.UnknownHostException

    今天在实验 Flink 连接 hive 的操作,由于 CDH 的 hadoop 是 HA,连接过程中报错如下:

    shengjk1
  • flink开发过程中遇到的问题集锦

    cannot be cast to com.google.protobuf.Message

    大数据技术与应用实战

扫码关注云+社区

领取腾讯云代金券