ZanderXu commented on code in PR #5200:
URL: https://github.com/apache/hadoop/pull/5200#discussion_r1062087729


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:
##########
@@ -979,7 +979,10 @@ public boolean complete(String src, String clientName,
                           ExtendedBlock last,  long fileId)
       throws IOException {
     checkNNStartup();
-    return namesystem.completeFile(src, clientName, last, fileId);
+    boolean result = namesystem.completeFile(src, clientName, last, fileId);
+    LOG.debug("complete: src={}, clientName={}, fileId={}, result={}.",

Review Comment:
   @goiri Thanks sir, I have updated it, please help me review it again. Thanks



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -465,6 +465,24 @@ public void setOwner(String src, String username, String 
groupname)
     }
   }
 
+  /**
+   * Try to get the remote location whose bpId is same with the input bpId 
from the input locations.
+   * @param locations the input RemoteLocations.
+   * @param bpId the input bpId.
+   * @return the remote location whose bpId is same with the input.
+   * @throws IOException
+   */
+  private RemoteLocation getLocationWithBPID(List<RemoteLocation> locations, 
String bpId)
+      throws IOException {
+    String nsId = rpcClient.getNameserviceForBlockPoolId(bpId);
+    for (RemoteLocation l : locations) {
+      if (l.getNameserviceId().equals(nsId)) {
+        return l;
+      }
+    }
+    throw new IOException("Can't found remote locations for the " + bpId);

Review Comment:
   @ayushtkn  Thanks sir, I have updated it, please help me review it again. 
Thanks



-- 
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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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