From 74962e34516a1eb81d1fffc11a8f194ade1ecd9a Mon Sep 17 00:00:00 2001 From: Brahma Reddy Battula Date: Sun, 25 Sep 2016 11:02:46 +0530 Subject: [PATCH] HDFS-10869. Remove the unused method InodeId#checkId(). Contributed by Jagadesh Kiran N (cherry picked from commit 3e37e243ee041e843e060b17c622ab50c8f9ff11) --- .../hadoop/hdfs/server/namenode/INodeId.java | 16 ---------------- 1 file changed, 16 deletions(-) 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); }