jojochuang commented on code in PR #4130:
URL: https://github.com/apache/ozone/pull/4130#discussion_r1083143739


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/DBCheckpointServlet.java:
##########
@@ -211,42 +205,22 @@ public static void writeDBCheckpointToStream(DBCheckpoint 
checkpoint,
       OutputStream destination)

Review Comment:
   Let's remove this method, and replace the usage of 
DBCheckpointServlet.writeDBCheckpointToStream()  with 
HddsServerUtil.writeDBCheckpointToStream(). (There are three usages)
   



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java:
##########
@@ -280,14 +280,14 @@ public static long getContainerID(File containerBaseDir) {
     return Long.parseLong(containerBaseDir.getName());
   }
 
-  public static String getContainerTarGzName(long containerId) {
-    return "container-" + containerId + ".tar.gz";
+  public static String getContainerTarName(long containerId) {
+    return "container-" + containerId + ".tar";
   }
 
   public static long retrieveContainerIdFromTarGzName(String tarGzName)

Review Comment:
   can you change the parameter name to tarName
   ```suggestion
     public static long retrieveContainerIdFromTarGzName(String tarName)
   ```



##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java:
##########
@@ -551,15 +545,11 @@ public static void writeDBCheckpointToStream(DBCheckpoint 
checkpoint,
           }
         }
       }
-    } catch (CompressorException e) {
-      throw new IOException(
-          "Can't compress the checkpoint: " +
-              checkpoint.getCheckpointLocation(), e);
     }
   }
 
-  private static void includeFile(File file, String entryName,
-      ArchiveOutputStream archiveOutputStream)
+  public static void includeFile(File file, String entryName,

Review Comment:
   If DBCheckPointServlet.writeDBCheckpointToStream() is removed, this method 
should stay private.



##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/helpers/TestContainerUtils.java:
##########
@@ -61,8 +61,8 @@ public void redactsDataBuffers() {
   @Test
   public void testTarGzName() throws IOException {
     long containerId = 100;
-    String tarGzName = "container-100.tar.gz";
-    assertEquals(tarGzName, ContainerUtils.getContainerTarGzName(containerId));
+    String tarGzName = "container-100.tar";

Review Comment:
   ```suggestion
       String tarName = "container-100.tar";
   ```



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