You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/02/24 08:54:03 UTC

[GitHub] [pinot] richardstartin commented on a change in pull request #8244: Support identifying Gzipped files by checking GZIP MAGIC_HEADER.

richardstartin commented on a change in pull request #8244:
URL: https://github.com/apache/pinot/pull/8244#discussion_r813667560



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/data/readers/RecordReaderUtils.java
##########
@@ -50,7 +49,7 @@ public static BufferedInputStream getBufferedInputStream(File dataFile)
 
   public static InputStream getInputStream(File dataFile)
       throws IOException {
-    if (dataFile.getName().endsWith(GZIP_FILE_EXTENSION)) {
+    if (GzipUtils.isGZipped(dataFile)) {

Review comment:
       +1, I would check the header rather than assume then throw too




-- 
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-unsubscribe@pinot.apache.org

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



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