adoroszlai commented on code in PR #5543:
URL: https://github.com/apache/ozone/pull/5543#discussion_r1385298588


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java:
##########
@@ -310,13 +311,13 @@ public static long getContainerID(File containerBaseDir) {
   }
 
   public static String getContainerTarName(long containerId) {
-    return "container-" + containerId + ".tar";
+    return "container-" + containerId + "-" + UUID.randomUUID() + ".tar";
   }
 
   public static long retrieveContainerIdFromTarName(String tarName)
       throws IOException {
     assert tarName != null;
-    Pattern pattern = Pattern.compile("container-(\\d+).tar");
+    Pattern pattern = Pattern.compile("container-(\\d+)((-.+.tar)|.tar)");

Review Comment:
   The new part is for the UUID being added to the local tar filename here:
   
   
https://github.com/apache/ozone/blob/e09d87f629397fcab25a49e103566e81048d210c/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java#L313-L315



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