public class HsFileDataIndexCache extends Object
Modifier and Type | Field and Description |
---|---|
static Object |
PLACEHOLDER
Placeholder of cache entry's value.
|
Constructor and Description |
---|
HsFileDataIndexCache(int numSubpartitions,
Path indexFilePath,
long numRetainedInMemoryRegionsMax,
HsFileDataIndexSpilledRegionManager.Factory spilledRegionManagerFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close
HsFileDataIndexCache , this will delete the index file. |
Optional<org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion> |
get(int subpartitionId,
int bufferIndex)
Get a region contains target bufferIndex and belong to target subpartition.
|
void |
put(int subpartition,
List<org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion> internalRegions)
Put regions to cache.
|
public static final Object PLACEHOLDER
public HsFileDataIndexCache(int numSubpartitions, Path indexFilePath, long numRetainedInMemoryRegionsMax, HsFileDataIndexSpilledRegionManager.Factory spilledRegionManagerFactory)
public Optional<org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion> 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<org.apache.flink.runtime.io.network.partition.hybrid.HsFileDataIndexImpl.InternalRegion> internalRegions)
subpartition
- the subpartition's id of regions.internalRegions
- regions to be cached.public void close() throws IOException
HsFileDataIndexCache
, this will delete the index file. After that, the index
can no longer be read or written.IOException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.