deemoliu commented on code in PR #14008:
URL: https://github.com/apache/pinot/pull/14008#discussion_r1764132139


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/TarCompressionUtils.java:
##########
@@ -94,14 +107,27 @@ public static void createCompressedTarFile(File inputFile, 
File outputFile)
   public static void createCompressedTarFile(File[] inputFiles, File 
outputFile)
       throws IOException {
     String compressorName = null;
-    for (String supportedCompressorExtension : 
COMPRESSOR_NAME_BY_FILE_EXTENSIONS.keySet()) {
-      if (outputFile.getName().endsWith(supportedCompressorExtension)) {
-        compressorName = 
COMPRESSOR_NAME_BY_FILE_EXTENSIONS.get(supportedCompressorExtension);
-        break;
+    if (outputFile.getName().endsWith(TAR_COMPRESSED_FILE_EXTENSION)) {
+      createCompressedTarFile(inputFiles, outputFile, _defaultCompressorName);
+    } else {
+      for (String supportedCompressorExtension : 
COMPRESSOR_NAME_BY_FILE_EXTENSIONS.keySet()) {
+        if (outputFile.getName().endsWith(supportedCompressorExtension)) {
+          compressorName = 
COMPRESSOR_NAME_BY_FILE_EXTENSIONS.get(supportedCompressorExtension);
+          createCompressedTarFile(inputFiles, outputFile, compressorName);
+        }

Review Comment:
   break?



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to