From 8955f718f1747debf367af385f0722b4d113e599 Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Thu, 6 Mar 2014 19:29:11 +0000 Subject: [PATCH] HDFS-6060. NameNode should not check DataNode layout version. Contributed by Brandon Li git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1575021 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../hdfs/server/namenode/NameNodeRpcServer.java | 15 --------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 45eac0ed3d3..c9e2b6fcdbb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -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) 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 68c4d25c8e0..f144c5909c9 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 @@ -104,7 +104,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; @@ -1100,20 +1099,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); - } - } } @Override // RefreshAuthorizationPolicyProtocol