Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6137

Datanode cannot rollback because LayoutVersion incorrect

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.5-alpha
    • Fix Version/s: None
    • Component/s: datanode
    • Labels:
      None

      Description

      upgrade from hadoop-2.0.5-alpha(QJM HA enabled) to the lastest trunk(HA disabled), which is successful. then stop the cluster, and rollback, then it throw exception:

      2014-03-21 18:33:19,384 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-1123524590-10.204.8.135-1395397158134 (storage id DS-1123524590-10.204.8.135-50010-1395397185148) service to 10-204-8-135/10.204.8.135:9000
      org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /data/hdfs/data/current/BP-1123524590-10.204.8.135-1395397158134. Reported: -55. Expecting = -40.
              at org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1083)
              at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.setFieldsFromProperties(BlockPoolSliceStorage.java:217)
              at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:922)
              at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.doTransition(BlockPoolSliceStorage.java:244)
              at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.recoverTransitionRead(BlockPoolSliceStorage.java:145)
              at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:234)
              at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:913)
              at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:884)
              at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
              at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
              at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
              at java.lang.Thread.run(Thread.java:744)
      

      I looked at the datanode dir, $datanode.dir/VERSION is always new, when we upgrade, this file was overwrited, so it MUST fail during rollback.

        Issue Links

          Activity

          Fengdong Yu created issue -
          Fengdong Yu made changes -
          Field Original Value New Value
          Description upgrade from hadoop-2.0.5-alpha(HA enabled) to the lastest trunk(HA disabled), which is successful. then stop the cluster, and rollback, then it throw exception:

          {code}
          2014-03-21 18:33:19,384 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-1123524590-10.204.8.135-1395397158134 (storage id DS-1123524590-10.204.8.135-50010-1395397185148) service to 10-204-8-135/10.204.8.135:9000
          org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /data/hdfs/data/current/BP-1123524590-10.204.8.135-1395397158134. Reported: -55. Expecting = -40.
                  at org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1083)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.setFieldsFromProperties(BlockPoolSliceStorage.java:217)
                  at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:922)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.doTransition(BlockPoolSliceStorage.java:244)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.recoverTransitionRead(BlockPoolSliceStorage.java:145)
                  at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:234)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:913)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:884)
                  at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
                  at java.lang.Thread.run(Thread.java:744)
          {code}
            
          I looked at the datanode dir, {datanode.dir}/VERSION is always new, when we upgrade, this file was overwrited, so it MUST fail during rollback.
          Fengdong Yu made changes -
          Description upgrade from hadoop-2.0.5-alpha(HA enabled) to the lastest trunk(HA disabled), which is successful. then stop the cluster, and rollback, then it throw exception:

          {code}
          2014-03-21 18:33:19,384 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-1123524590-10.204.8.135-1395397158134 (storage id DS-1123524590-10.204.8.135-50010-1395397185148) service to 10-204-8-135/10.204.8.135:9000
          org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /data/hdfs/data/current/BP-1123524590-10.204.8.135-1395397158134. Reported: -55. Expecting = -40.
                  at org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1083)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.setFieldsFromProperties(BlockPoolSliceStorage.java:217)
                  at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:922)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.doTransition(BlockPoolSliceStorage.java:244)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.recoverTransitionRead(BlockPoolSliceStorage.java:145)
                  at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:234)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:913)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:884)
                  at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
                  at java.lang.Thread.run(Thread.java:744)
          {code}
            
          I looked at the datanode dir, {datanode.dir}/VERSION is always new, when we upgrade, this file was overwrited, so it MUST fail during rollback.
          upgrade from hadoop-2.0.5-alpha(HA enabled) to the lastest trunk(HA disabled), which is successful. then stop the cluster, and rollback, then it throw exception:

          {code}
          2014-03-21 18:33:19,384 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-1123524590-10.204.8.135-1395397158134 (storage id DS-1123524590-10.204.8.135-50010-1395397185148) service to 10-204-8-135/10.204.8.135:9000
          org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /data/hdfs/data/current/BP-1123524590-10.204.8.135-1395397158134. Reported: -55. Expecting = -40.
                  at org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1083)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.setFieldsFromProperties(BlockPoolSliceStorage.java:217)
                  at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:922)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.doTransition(BlockPoolSliceStorage.java:244)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.recoverTransitionRead(BlockPoolSliceStorage.java:145)
                  at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:234)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:913)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:884)
                  at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
                  at java.lang.Thread.run(Thread.java:744)
          {code}
            
          I looked at the datanode dir, $datanode.dir/VERSION is always new, when we upgrade, this file was overwrited, so it MUST fail during rollback.
          Fengdong Yu made changes -
          Description upgrade from hadoop-2.0.5-alpha(HA enabled) to the lastest trunk(HA disabled), which is successful. then stop the cluster, and rollback, then it throw exception:

          {code}
          2014-03-21 18:33:19,384 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-1123524590-10.204.8.135-1395397158134 (storage id DS-1123524590-10.204.8.135-50010-1395397185148) service to 10-204-8-135/10.204.8.135:9000
          org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /data/hdfs/data/current/BP-1123524590-10.204.8.135-1395397158134. Reported: -55. Expecting = -40.
                  at org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1083)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.setFieldsFromProperties(BlockPoolSliceStorage.java:217)
                  at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:922)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.doTransition(BlockPoolSliceStorage.java:244)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.recoverTransitionRead(BlockPoolSliceStorage.java:145)
                  at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:234)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:913)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:884)
                  at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
                  at java.lang.Thread.run(Thread.java:744)
          {code}
            
          I looked at the datanode dir, $datanode.dir/VERSION is always new, when we upgrade, this file was overwrited, so it MUST fail during rollback.
          upgrade from hadoop-2.0.5-alpha(QJM HA enabled) to the lastest trunk(HA disabled), which is successful. then stop the cluster, and rollback, then it throw exception:

          {code}
          2014-03-21 18:33:19,384 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-1123524590-10.204.8.135-1395397158134 (storage id DS-1123524590-10.204.8.135-50010-1395397185148) service to 10-204-8-135/10.204.8.135:9000
          org.apache.hadoop.hdfs.server.common.IncorrectVersionException: Unexpected version of storage directory /data/hdfs/data/current/BP-1123524590-10.204.8.135-1395397158134. Reported: -55. Expecting = -40.
                  at org.apache.hadoop.hdfs.server.common.Storage.setLayoutVersion(Storage.java:1083)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.setFieldsFromProperties(BlockPoolSliceStorage.java:217)
                  at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:922)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.doTransition(BlockPoolSliceStorage.java:244)
                  at org.apache.hadoop.hdfs.server.datanode.BlockPoolSliceStorage.recoverTransitionRead(BlockPoolSliceStorage.java:145)
                  at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:234)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:913)
                  at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:884)
                  at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
                  at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
                  at java.lang.Thread.run(Thread.java:744)
          {code}
            
          I looked at the datanode dir, $datanode.dir/VERSION is always new, when we upgrade, this file was overwrited, so it MUST fail during rollback.
          Tsz Wo Nicholas Sze made changes -
          Link This issue relates to HDFS-5526 [ HDFS-5526 ]
          Tsz Wo Nicholas Sze made changes -
          Affects Version/s 2.0.5-alpha [ 12324428 ]
          Affects Version/s 2.4.0 [ 12326143 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Fengdong Yu
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:

                Development