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_r371322050
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
 ##########
 @@ -2667,4 +2667,15 @@ public Long getNextSPSPath() throws IOException {
     }
     return namesystem.getBlockManager().getSPSManager().getNextPathId();
   }
+
+  public boolean swapBlockList(String src, String dst, long maxTimestamp)
+      throws IOException {
+    checkNNStartup();
+    if (stateChangeLog.isDebugEnabled()) {
+      stateChangeLog.debug("*DIR* NameNode.swapBlockList: {} and {}", src, 
dst);
+    }
+    namesystem.checkOperation(OperationCategory.WRITE);
 
 Review comment:
   This isn't required, This would be redundant check, You are having the same 
check in FSNamesystem. Its required only twice, once before taking lock and 
once after...

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to