jasperjiaguo commented on code in PR #8753:
URL: https://github.com/apache/pinot/pull/8753#discussion_r892749687


##########
pinot-common/src/main/java/org/apache/pinot/common/utils/TarGzCompressionUtils.java:
##########
@@ -198,4 +221,29 @@ public static void untarOneFile(File inputFile, String 
fileName, File outputFile
       throw new IOException(String.format("Failed to find file: %s in: %s", 
fileName, inputFile));
     }
   }
+
+  public static long copyLarge(InputStream inputStream, FileOutputStream 
outputStream, long rateLimit)

Review Comment:
   done



##########
pinot-common/src/main/java/org/apache/pinot/common/utils/TarGzCompressionUtils.java:
##########
@@ -123,6 +132,16 @@ public static List<File> untar(File inputFile, File 
outputDir)
    */
   public static List<File> untar(InputStream inputStream, File outputDir)
       throws IOException {
+      return untarRateLimit(inputStream, outputDir, NO_RATE_LIMIT);
+  }
+
+  /**
+   * Un-tars an inputstream of a tar.gz file into a directory, returns all the 
untarred files/directories.
+   * RateLimit limits the untar rate
+   * <p>For security reason, the untarred files must reside in the output 
directory.
+   */
+  public static List<File> untarRateLimit(InputStream inputStream, File 
outputDir, long rateLimit)

Review Comment:
   done



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