Akshat-Jain commented on PR #16606:
URL: https://github.com/apache/druid/pull/16606#issuecomment-2172382548

   @LakshSingla I haven't tried it out. But this particular error `Unexpected 
end of ZLIB input stream` is for gz file only. The problem was that we were 
wrapping the RetryingInputStream into a FilterInputStream and then creating a 
GZIPInputStream using the FilterInputStream (inside the `gzipInputStream()` 
method). But that doesn't happen for most of the other `XyzInputStream` in the 
way we are creating them, so they aren't the same.
   
   ```java
   public static InputStream decompress(final InputStream in, final String 
fileName) throws IOException
     {
       if (fileName.endsWith(Format.GZ.getSuffix())) {
         return gzipInputStream(in);
       } else if (fileName.endsWith(Format.BZ2.getSuffix())) {
         return new BZip2CompressorInputStream(in, true);
       } else if (fileName.endsWith(Format.XZ.getSuffix())) {
         return new XZCompressorInputStream(in, true);
       } else if (fileName.endsWith(Format.SNAPPY.getSuffix())) {
         return new FramedSnappyCompressorInputStream(in);
       .
       .
       .
   }
   ```


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