mukund-thakur commented on a change in pull request #2368:
URL: https://github.com/apache/hadoop/pull/2368#discussion_r522187925



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java
##########
@@ -223,16 +244,19 @@ private int readInternal(final long position, final 
byte[] b, final int offset,
 
       // queue read-aheads
       int numReadAheads = this.readAheadQueueDepth;
-      long nextSize;
       long nextOffset = position;
+      // First read to queue needs to be of readBufferSize and later

Review comment:
       I don't think there is any bug in the current production code as such. 
As far as I understand the code the change is introduced becuase new config is 
introduced. 
   Now my question is why not use readAheadBlockSize for the first call as 
well? The calls would be like 
   offset=0 Length=4MB 
   offset=4MB Length=4MB
   
   Sorry to say this but honestly speaking, introducing so many configs is 
making the code complex and confusing.  




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



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

Reply via email to