saxenapranav commented on code in PR #6699:
URL: https://github.com/apache/hadoop/pull/6699#discussion_r1683882895


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java:
##########
@@ -145,6 +158,10 @@ public AbfsInputStream(
     this.readAheadQueueDepth = abfsInputStreamContext.getReadAheadQueueDepth();
     this.tolerateOobAppends = abfsInputStreamContext.isTolerateOobAppends();
     this.eTag = eTag;
+    this.fileStatusInformationPresent = StringUtils.isNotEmpty(eTag);
+    this.prefetchTriggerOnFirstRead =
+        abfsInputStreamContext.isPrefetchTriggerOnFirstRead()
+            && getFileStatusInformationPresent();

Review Comment:
   Have removed the logic in the constructor. Now, prefetchTriggerOnFirstRead 
would just store the config value. It will be used in a method:
   ```
     private boolean effectiveReadAhead() {
       return (prefetchTriggerOnFirstRead && hasFileStatusInfo())
           || sequentialReadStarted;
     }
   ```
   
   which shall be used to check if read ahead can be used or not in 
`readInternal`.



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

Reply via email to