clintropolis commented on a change in pull request #8903: S3 input source
URL: https://github.com/apache/incubator-druid/pull/8903#discussion_r350495706
##########
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
{
return readFrom(0);
}
/**
- * Directly opens an {@link InputStream} starting at the given offset on the
input entity.
+ * Directly opens an {@link InputStream} starting at the given offset on the
input entity. Decompression should be
+ * handled externally, this should return the raw stream for the object.
*
* @param offset an offset to start reading from. A non-negative integer
counting
* the number of bytes from the beginning of the entity
*/
InputStream readFrom(long offset) throws IOException;
+
+ /**
+ * Get path to decompress a compressed stream for the entity
Review comment:
redid javadocs, renamed method to more generic `getPath` since it's also a
correct name given usage and maybe this is useful for other things
----------------------------------------------------------------
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]