captainzmc commented on a change in pull request #1150:
URL: https://github.com/apache/hadoop-ozone/pull/1150#discussion_r454315354



##########
File path: 
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java
##########
@@ -750,6 +751,25 @@ public void renameKey(String volumeName, String bucketName,
     ozoneManagerClient.renameKey(keyArgs, toKeyName);
   }
 
+  @Override
+  public void renameKeys(String volumeName, String bucketName,
+                         Map<String, String> keyMap) throws IOException {
+    verifyVolumeName(volumeName);
+    verifyBucketName(bucketName);
+    HddsClientUtils.checkNotNull(keyMap);
+    Map <OmKeyArgs, String> keyArgsMap = new HashMap<>();
+    for (Map.Entry< String, String > entry : keyMap.entrySet()) {
+      OmKeyArgs keyArgs = new OmKeyArgs.Builder()
+          .setVolumeName(volumeName)
+          .setBucketName(bucketName)
+          .setKeyName(entry.getKey())
+          .build();
+      keyArgsMap.put(keyArgs, entry.getValue());
+    }

Review comment:
       The main purpose here is to keep up with the [renameKey 
implementation](https://github.com/apache/hadoop-ozone/pull/1150/files#diff-ddfee0637dda7038422139fc5a3cbfdeR751)
 and help make the code implementation clearer.




----------------------------------------------------------------
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: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to