anujmodi2021 commented on code in PR #7801:
URL: https://github.com/apache/hadoop/pull/7801#discussion_r2214978490
##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsInputStream.java:
##########
@@ -773,9 +788,14 @@ byte[] getBuffer() {
return buffer;
}
+ /**
+ * Checks if any version of read ahead is enabled.
+ * If both are disabled, then skip read ahead logic.
+ * @return true if read ahead is enabled, false otherwise.
+ */
@VisibleForTesting
public boolean isReadAheadEnabled() {
- return readAheadEnabled;
+ return (readAheadEnabled || readAheadV2Enabled) && readBufferManager !=
null;
Review Comment:
method is to check if readahaead is enabled or not and for that we need
readBufferManager to be not null.
This is added only as a precaution to avoid NPE
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]