goiri commented on a change in pull request #3009:
URL: https://github.com/apache/hadoop/pull/3009#discussion_r632696701



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java
##########
@@ -596,13 +620,18 @@ public boolean rename(final String src, final String dst)
 
     final List<RemoteLocation> srcLocations =
         rpcServer.getLocationsForPath(src, true, false);
-    final List<RemoteLocation> dstLocations =
-        rpcServer.getLocationsForPath(dst, false, false);
-    // srcLocations may be trimmed by getRenameDestinations()

Review comment:
       We should keep this comment

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java
##########
@@ -588,6 +589,29 @@ public long getPreferredBlockSize(String src) throws 
IOException {
     return rpcClient.invokeSequential(locations, method, Long.class, null);
   }
 
+  /**
+   * Check if Path is Trash.
+   */
+  private static boolean isTrashPath(String path) throws IOException {
+    String trashRoot = FileSystem.USER_HOME_PREFIX + "/" +
+        RouterRpcServer.getRemoteUser().getUserName() + "/" +
+        FileSystem.TRASH_PREFIX;
+    return path.startsWith(trashRoot);
+  }
+
+  /**
+   * Use the combination of src locations and dst to return RemoteParam.
+   */
+  private static RemoteParam getRenameDestinations(

Review comment:
       Complete the javadoc




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



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