xinglin commented on a change in pull request #3201:
URL: https://github.com/apache/hadoop/pull/3201#discussion_r674517832



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
##########
@@ -160,6 +164,8 @@ private static INodeDirectory createRoot(FSNamesystem 
namesystem) {
   private final int contentCountLimit; // max content summary counts per run
   private final long contentSleepMicroSec;
   private final INodeMap inodeMap; // Synchronized by dirLock
+  // Temp InodeMap used when loading an FS image.
+  private final GSet<INode, INodeWithAdditionalFields> inodeMapTemp;

Review comment:
       There are three classes that work together to load an FS image.
   _FSImage.java_ uses functions from _FSImageFormatProtobuf.java_, which uses 
functions from  _FSImageFormatPBINode.java_. If we make inodeMapTemp a local 
variable in loadFSImage@676 in _FSImage.java_, potentially, we need to pass 
that variable down the stream and need to modify quite extensively. I am not 
sure we want to do that.
   
   Right now, _FSImageFormatPBINode_ has a reference to the FSDirectory object 
and thus can call functions of FSDirectory, to add inodes directly. 
   
   




-- 
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]

Reply via email to