HDFS-10869. Remove the unused method InodeId#checkId(). Contributed by Jagadesh Kiran N
This commit is contained in:
parent
4d16d2d72f
commit
3e37e243ee
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user