diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 419f38f723f..494967a9e99 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -643,6 +643,8 @@ HDFS-5535 subtasks: HDFS-6041. Downgrade/Finalize should rename the rollback image instead of purging it. (jing9) + HDFS-6060. NameNode should not check DataNode layout version (brandonli) + Release 2.3.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java index a4b7e76be7a..e973dfc63ad 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java @@ -105,7 +105,6 @@ import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifie import org.apache.hadoop.hdfs.server.blockmanagement.BlockManager; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants.NamenodeRole; import org.apache.hadoop.hdfs.server.common.IncorrectVersionException; -import org.apache.hadoop.hdfs.server.datanode.DataNodeLayoutVersion; import org.apache.hadoop.hdfs.server.namenode.NameNode.OperationCategory; import org.apache.hadoop.hdfs.server.namenode.metrics.NameNodeMetrics; import org.apache.hadoop.hdfs.server.namenode.web.resources.NamenodeWebHdfsMethods; @@ -1097,20 +1096,6 @@ class NameNodeRpcServer implements NamenodeProtocols { + " but the expected ID is " + expectedID); throw new UnregisteredNodeException(nodeReg); } - - // verify layout version if there is no rolling upgrade. - if (!namesystem.isRollingUpgrade()) { - final int lv = nodeReg.getVersion(); - final int expectedLV = nodeReg instanceof NamenodeRegistration? - NameNodeLayoutVersion.CURRENT_LAYOUT_VERSION - : DataNodeLayoutVersion.CURRENT_LAYOUT_VERSION; - if (expectedLV != nodeReg.getVersion()) { - LOG.warn("Layout versions mismatched: the " - + nodeReg.getClass().getSimpleName() + " LV is " + lv - + " but the expected LV is " + expectedLV); - throw new UnregisteredNodeException(nodeReg); - } - } }