ayushtkn commented on code in PR #5483:
URL: https://github.com/apache/hadoop/pull/5483#discussion_r1140203626


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -641,6 +646,11 @@ public void rename2(final String src, final String dst,
         new Class<?>[] {String.class, String.class, options.getClass()},
         new RemoteParam(), dstParam, options);
     if (isMultiDestDirectory(src)) {
+      if (locs.size() == srcLocations.size()) {
+        throw new IOException(
+            "Rename of " + src + " to " + dst + " is not allowed," +
+                " The remote location should be exactly same.");

Review Comment:
   This exception message is very confusing. Unless I went back and checked the 
description, wasn't able to decode the intent.
   Can we change it to 
   ```
   throw new IOException(
               "Rename of " + src + " to " + dst + " is not allowed," +
                   " The number of remote locations for both source and target 
should be same.");
   ```



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