gianm commented on a change in pull request #8903: S3 input source
URL: https://github.com/apache/incubator-druid/pull/8903#discussion_r349862377
 
 

 ##########
 File path: 
core/src/main/java/org/apache/druid/data/input/RetryingInputEntity.java
 ##########
 @@ -32,30 +33,39 @@
   @Override
   default InputStream open() throws IOException
   {
-    return new RetryingInputStream<>(
+    RetryingInputStream<?> retryingInputStream = new RetryingInputStream<>(
         this,
         new RetryingInputEntityOpenFunction(),
         getRetryCondition(),
         RetryUtils.DEFAULT_MAX_TRIES
     );
+    return CompressionUtils.decompress(retryingInputStream, 
getDecompressionPath());
   }
 
   /**
-   * Directly opens an {@link InputStream} on the input entity.
+   * Directly opens an {@link InputStream} on the input entity. Decompression 
should be handled externally, this should
+   * return the raw stream for the object.
    */
   default InputStream readFromStart() throws IOException
 
 Review comment:
   nit: These seem like "internal" methods that aren't actually meant to be 
called by users of the interface. In that case RetryingInputEntity probably 
makes more sense as an abstract class than as an interface, with these methods 
marked `protected`. I won't insist it be changed, but if it stays an interface, 
it'd be nice for the javadocs to say that external callers aren't meant to use 
these methods.
   
   The reason is a general assumption that any method on an interface is meant 
for users of the interface.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to