maheshk114 commented on a change in pull request #883: HIVE-22736 Support 
multiple encryption zones in replication
URL: https://github.com/apache/hive/pull/883#discussion_r370046276
 
 

 ##########
 File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java
 ##########
 @@ -213,9 +227,18 @@ public int recycle(Path path, RecycleType type, boolean 
ifPurge) throws IOExcept
         switch (type) {
         case MOVE: {
           LOG.info("Moving {} to {}", path.toString(), cmPath.toString());
-
           // Rename fails if the file with same name already exist.
-          success = fs.rename(path, cmPath);
+          Retry<Boolean> retriable = new Retry<Boolean>(IOException.class) {
+            @Override
+            public Boolean execute() throws IOException {
+              return fs.rename(path, cmPath);
+            }
+          };
+          try {
+            success = retriable.run();
+          } catch (Exception e) {
+            throw new 
MetaException(org.apache.hadoop.util.StringUtils.stringifyException(e));
 
 Review comment:
   It can be a IOException

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


With regards,
Apache Git Services

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

Reply via email to