Class BlockManagerParameters
java.lang.Object
org.apache.hadoop.fs.impl.prefetch.BlockManagerParameters
This class is used to provide parameters to
BlockManager.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetConf()intwithBlockData(BlockData data) Sets the object holding blocks data info for the underlying file.withBufferPoolSize(int poolSize) Sets the in-memory cache size as number of blocks.withConf(Configuration configuration) Sets the configuration object.Sets the executor service future pool that is later used to perform async prefetch tasks.withLocalDirAllocator(LocalDirAllocator dirAllocator) Sets the local dir allocator for round-robin disk allocation while creating files.withMaxBlocksCount(int blocksCount) Sets the max blocks count to be kept in cache at any time.withPrefetchingStatistics(PrefetchingStatistics statistics) Sets the prefetching statistics for the stream.withTrackerFactory(DurationTrackerFactory factory) Sets the duration tracker with statistics to update.
-
Constructor Details
-
BlockManagerParameters
public BlockManagerParameters()
-
-
Method Details
-
getFuturePool
- Returns:
- The Executor future pool to perform async prefetch tasks.
-
getBlockData
- Returns:
- The object holding blocks data info for the underlying file.
-
getBufferPoolSize
public int getBufferPoolSize()- Returns:
- The size of the in-memory cache.
-
getPrefetchingStatistics
- Returns:
- The prefetching statistics for the stream.
-
getConf
- Returns:
- The configuration object.
-
getLocalDirAllocator
- Returns:
- The local dir allocator instance.
-
getMaxBlocksCount
public int getMaxBlocksCount()- Returns:
- The max blocks count to be kept in cache at any time.
-
getTrackerFactory
- Returns:
- The duration tracker with statistics to update.
-
withFuturePool
Sets the executor service future pool that is later used to perform async prefetch tasks.- Parameters:
pool- The future pool.- Returns:
- The builder.
-
withBlockData
Sets the object holding blocks data info for the underlying file.- Parameters:
data- The block data object.- Returns:
- The builder.
-
withBufferPoolSize
Sets the in-memory cache size as number of blocks.- Parameters:
poolSize- The buffer pool size as number of blocks.- Returns:
- The builder.
-
withPrefetchingStatistics
Sets the prefetching statistics for the stream.- Parameters:
statistics- The prefetching statistics.- Returns:
- The builder.
-
withConf
Sets the configuration object.- Parameters:
configuration- The configuration object.- Returns:
- The builder.
-
withLocalDirAllocator
Sets the local dir allocator for round-robin disk allocation while creating files.- Parameters:
dirAllocator- The local dir allocator object.- Returns:
- The builder.
-
withMaxBlocksCount
Sets the max blocks count to be kept in cache at any time.- Parameters:
blocksCount- The max blocks count.- Returns:
- The builder.
-
withTrackerFactory
Sets the duration tracker with statistics to update.- Parameters:
factory- The tracker factory object.- Returns:
- The builder.
-