hemantk-12 commented on code in PR #5253:
URL: https://github.com/apache/ozone/pull/5253#discussion_r1318961720


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java:
##########
@@ -350,7 +350,19 @@ boolean processKey(List<String> keyList) throws 
IOException {
       // TODO RenameKey needs to be changed to batch operation
       for (String key : keyList) {
         String newKeyName = dstKey.concat(key.substring(srcKey.length()));
-        adapter.renameKey(key, newKeyName);
+        try {
+          adapter.renameKey(key, newKeyName);
+        } catch (OMException ome) {
+          LOG.error("rename key failed: {}. source:{}, destin:{}",

Review Comment:
   nit: I think the log message can be better.
   ```
   LOG.error("Key rename failed for source key: {} to " +
           "destination key: {}.", key, newKeyName, ome);
   ``` 
   or:
   ```
   LOG.error("Key rename failed with error: {}. Source key: {}, " +
           "Destination key: {}", ome.getMessage(), key, newKeyName);
   ```
   
   Same for 
https://github.com/apache/ozone/pull/5253/files#diff-b2802792bb08b569714c90f10ecda42d917dd6329137188472010d2ea7476b1bR344



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to