ayushtkn commented on a change in pull request #1819: HDFS-14989. Add a 
'swapBlockList' operation to Namenode.
URL: https://github.com/apache/hadoop/pull/1819#discussion_r373296427
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SwapBlockListOp.java
 ##########
 @@ -130,15 +129,10 @@ private static void validateInode(INodesInPath srcIIP)
 
     String errorPrefix = "DIR* FSDirectory.swapBlockList: ";
     String error = "Swap Block List input ";
-    final INode srcInode = srcIIP.getLastINode();
 
-    // Check if INode is null.
-    if (srcInode == null) {
-      error  += srcIIP.getPath() + " is not found.";
-      NameNode.stateChangeLog.warn(errorPrefix + error);
-      throw new FileNotFoundException(error);
-    }
+    FSDirectory.resolveLastINode(srcIIP);
 
+    final INode srcInode = srcIIP.getLastINode();
 
 Review comment:
   Any reason for not assigning FSDirectory.resolveLastINode(srcIIP); to 
srcInode?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to