diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeId.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeId.java index 10139bf6cbf..16c28b2528a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeId.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeId.java @@ -17,10 +17,7 @@ */ package org.apache.hadoop.hdfs.server.namenode; -import java.io.FileNotFoundException; - import org.apache.hadoop.classification.InterfaceAudience; -import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.util.SequentialNumber; /** @@ -39,19 +36,6 @@ public class INodeId extends SequentialNumber { public static final long ROOT_INODE_ID = LAST_RESERVED_ID + 1; public static final long INVALID_INODE_ID = -1; - /** - * To check if the request id is the same as saved id. Don't check fileId - * with GRANDFATHER_INODE_ID for backward compatibility. - */ - public static void checkId(long requestId, INode inode) - throws FileNotFoundException { - if (requestId != HdfsConstants.GRANDFATHER_INODE_ID && requestId != inode.getId()) { - throw new FileNotFoundException( - "ID mismatch. Request id and saved id: " + requestId + " , " - + inode.getId() + " for file " + inode.getFullPathName()); - } - } - INodeId() { super(ROOT_INODE_ID); }