steveloughran commented on code in PR #5832: URL: https://github.com/apache/hadoop/pull/5832#discussion_r1293641249
########## hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/prefetch/S3ACachingInputStream.java: ########## @@ -76,36 +79,75 @@ public S3ACachingInputStream( S3AInputStreamStatistics streamStatistics, Configuration conf, LocalDirAllocator localDirAllocator) { - super(context, s3Attributes, client, streamStatistics); - this.numBlocksToPrefetch = this.getContext().getPrefetchBlockCount(); - int bufferPoolSize = this.numBlocksToPrefetch + 1; - this.blockManager = this.createBlockManager( - this.getContext().getFuturePool(), - this.getReader(), - this.getBlockData(), - bufferPoolSize, - conf, - localDirAllocator); + super(context, s3Attributes, client, streamStatistics); + this.conf = conf; + this.localDirAllocator = localDirAllocator; + this.numBlocksToPrefetch = getContext().getPrefetchBlockCount(); + demandCreateBlockManager(); int fileSize = (int) s3Attributes.getLen(); LOG.debug("Created caching input stream for {} (size = {})", this.getName(), fileSize); + streamStatistics.setPrefetchState(numBlocksToPrefetch > 0, Review Comment: set to true. i am thinking about a "no prefetch" option where it's only on demand/vector io; but can tune that if/when implemented -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org