bilaharith commented on a change in pull request #2464:
URL: https://github.com/apache/hadoop/pull/2464#discussion_r526588179



##########
File path: 
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java
##########
@@ -162,14 +172,86 @@ private int readOneBlock(final byte[] b, final int off, 
final int len) throws IO
       throw new IndexOutOfBoundsException();
     }
 
-    //If buffer is empty, then fill the buffer.
-    if (bCursor == limit) {
+    if (firstRead && this.readSmallFilesCompletely
+        && contentLength <= bufferSize) { //  Read small files completely
+      if (readFileCompletely() == -1) {
+        return -1;
+      }
+    } else if (firstRead && this.optimizeFooterRead && fCursor
+        == contentLength - FOOTER_DELTA) {  //  Read the last one block if the

Review comment:
       Done




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