public class FileDataIndexCache<T extends FileDataIndexRegionHelper.Region> extends Object
| Modifier and Type | Field and Description |
|---|---|
static Object |
PLACEHOLDER
Placeholder of cache entry's value.
|
| Constructor and Description |
|---|
FileDataIndexCache(int numSubpartitions,
Path indexFilePath,
long numRetainedInMemoryRegionsMax,
FileDataIndexSpilledRegionManager.Factory<T> spilledRegionManagerFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close
FileDataIndexCache, this will delete the index file. |
Optional<T> |
get(int subpartitionId,
int bufferIndex)
Get a region contains target bufferIndex and belong to target subpartition.
|
void |
put(int subpartition,
List<T> fileRegions)
Put regions to cache.
|
public static final Object PLACEHOLDER
public FileDataIndexCache(int numSubpartitions,
Path indexFilePath,
long numRetainedInMemoryRegionsMax,
FileDataIndexSpilledRegionManager.Factory<T> spilledRegionManagerFactory)
public Optional<T> get(int subpartitionId, int bufferIndex)
subpartitionId - the subpartition that target buffer belong to.bufferIndex - the index of target buffer.Optional#empty();public void put(int subpartition,
List<T> fileRegions)
subpartition - the subpartition's id of regions.fileRegions - regions to be cached.public void close()
throws IOException
FileDataIndexCache, this will delete the index file. After that, the index can
no longer be read or written.IOExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.