Author: brandonli Date: Thu Mar 6 19:29:11 2014 New Revision: 1575021 URL: http://svn.apache.org/r1575021 Log: HDFS-6060. NameNode should not check DataNode layout version. Contributed by Brandon Li
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1575021&r1=1575020&r2=1575021&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Thu Mar 6 19:29:11 2014 @@ -703,6 +703,8 @@ Release 2.4.0 - UNRELEASED HDFS-6059. TestBlockReaderLocal fails if native library is not available. (Akira AJISAKA via Colin Patrick McCabe) + HDFS-6060. NameNode should not check DataNode layout version (brandonli) + BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9) Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java?rev=1575021&r1=1575020&r2=1575021&view=diff ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java (original) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java Thu Mar 6 19:29:11 2014 @@ -104,7 +104,6 @@ import org.apache.hadoop.hdfs.security.t 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; @@ -1100,20 +1099,6 @@ class NameNodeRpcServer implements Namen + " 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); - } - } } @Override // RefreshAuthorizationPolicyProtocol