anmolanmol1234 commented on code in PR #7801: URL: https://github.com/apache/hadoop/pull/7801#discussion_r2228270551
########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ReadBufferManager.java: ########## @@ -19,16 +19,43 @@ package org.apache.hadoop.fs.azurebfs.services; import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; +import java.util.Queue; +import java.util.Stack; +import java.util.concurrent.locks.ReentrantLock; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.hadoop.classification.VisibleForTesting; import org.apache.hadoop.fs.azurebfs.contracts.services.ReadBufferStatus; import org.apache.hadoop.fs.azurebfs.utils.TracingContext; /** - * Interface for managing read buffers for Azure Blob File System input streams. + * Abstract class for managing read buffers for Azure Blob File System input streams. */ -public interface ReadBufferManager { +public abstract class ReadBufferManager { + protected static final Logger LOGGER = LoggerFactory.getLogger( + ReadBufferManager.class); + protected static final ReentrantLock LOCK = new ReentrantLock(); + private static final int ONE_KB = 1024; + private static final int ONE_MB = ONE_KB * ONE_KB; + + private static int thresholdAgeMilliseconds; + private static int blockSize = 4 * ONE_MB; // default block size for read-ahead in bytes Review Comment: Right if we are refactoring, we can make this also come from the configuration class? -- 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