saxenapranav commented on code in PR #6699: URL: https://github.com/apache/hadoop/pull/6699#discussion_r1683884545
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java: ########## @@ -424,11 +515,20 @@ private int optimisedRead(final byte[] b, final int off, final int len, // If the read was partial and the user requested part of data has // not read then fallback to readoneblock. When limit is smaller than // bCursor that means the user requested data has not been read. - if (fCursor < contentLength && bCursor > limit) { + if (fCursor < getContentLength() && bCursor > limit) { restorePointerState(); return readOneBlock(b, off, len); } - return copyToUserBuffer(b, off, len); + return copyToUserBuffer(b, off, len, isOptimizedReadWithoutContentLengthInformation); + } + + @VisibleForTesting + long getContentLength() { + return contentLength; + } + + boolean getFileStatusInformationPresent() { Review Comment: Taken. ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java: ########## @@ -467,7 +566,21 @@ private boolean validate(final byte[] b, final int off, final int len) return true; } - private int copyToUserBuffer(byte[] b, int off, int len){ + private int copyToUserBuffer(byte[] b, int off, int len, + final boolean isOptimizedReadWithoutContentLengthInformation){ Review Comment: Taken. -- 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