xinglin commented on a change in pull request #3201:
URL: https://github.com/apache/hadoop/pull/3201#discussion_r674174955
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
##########
@@ -1860,6 +1928,55 @@ FSPermissionChecker getPermissionChecker()
}
}
+ public INode getInode(INode inode) {
+ return inodeMap.get(inode);
+ }
+ public INode getInodeFromTempINodeMap(long id) {
+ LOG.debug("getInodeFromTempINodeMap: id={}, TempINodeMap.size={}",
+ id, inodeMapTemp.size());
+ INode inode = new INodeWithAdditionalFields(id, null,
Review comment:
Awesome suggestion! I didn't like the original version of this section
of code at all: very long and tedious, just in order to create an INode object,
whose primary purpose is to be able to compare by inode id.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]