Class TieredStorageConfiguration
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.common.TieredStorageConfiguration
-
public class TieredStorageConfiguration extends Object
Configurations for the Tiered Storage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTieredStorageConfiguration.BuilderThe builder forTieredStorageConfiguration.
-
Constructor Summary
Constructors Constructor Description TieredStorageConfiguration(String remoteStorageBasePath, int tieredStorageBufferSize, int memoryTierExclusiveBuffers, int diskTierExclusiveBuffers, int remoteTierExclusiveBuffers, int accumulatorExclusiveBuffers, int memoryTierNumBytesPerSegment, int diskTierNumBytesPerSegment, int remoteTierNumBytesPerSegment, float numBuffersTriggerFlushRatio, java.time.Duration diskIOSchedulerRequestTimeout, float minReserveDiskSpaceFraction, List<TierFactory> tierFactories, List<Integer> tierExclusiveBuffers)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TieredStorageConfiguration.Builderbuilder(int tieredStorageBufferSize, String remoteStorageBasePath)static TieredStorageConfiguration.Builderbuilder(String remoteStorageBasePath)intgetAccumulatorExclusiveBuffers()Get exclusive buffer number of accumulator.java.time.DurationgetDiskIOSchedulerBufferRequestTimeout()Maximum time to wait when requesting read buffers from the buffer pool before throwing an exception inDiskIOScheduler.intgetDiskTierExclusiveBuffers()Get exclusive buffer number of disk tier.intgetDiskTierNumBytesPerSegment()Get the segment size of disk tier.List<Integer>getEachTierExclusiveBufferNum()Get exclusive buffer number of each tier.intgetMemoryTierExclusiveBuffers()Get exclusive buffer number of memory tier.intgetMemoryTierNumBytesPerSegment()Get the segment size of memory tier.floatgetMinReserveDiskSpaceFraction()Minimum reserved disk space fraction in disk tier.floatgetNumBuffersTriggerFlushRatio()When the number of buffers that have been requested exceeds this threshold, trigger the flushing operation in eachTierProducerAgent.StringgetRemoteStorageBasePath()Get the base path on remote storage.intgetRemoteTierExclusiveBuffers()Get exclusive buffer number of remote tier.intgetRemoteTierNumBytesPerSegment()Get the segment size of remote tier.intgetTieredStorageBufferSize()Get the buffer size in tiered storage.List<TierFactory>getTierFactories()intgetTotalExclusiveBufferNum()Get the total exclusive buffer number.
-
-
-
Constructor Detail
-
TieredStorageConfiguration
public TieredStorageConfiguration(String remoteStorageBasePath, int tieredStorageBufferSize, int memoryTierExclusiveBuffers, int diskTierExclusiveBuffers, int remoteTierExclusiveBuffers, int accumulatorExclusiveBuffers, int memoryTierNumBytesPerSegment, int diskTierNumBytesPerSegment, int remoteTierNumBytesPerSegment, float numBuffersTriggerFlushRatio, java.time.Duration diskIOSchedulerRequestTimeout, float minReserveDiskSpaceFraction, List<TierFactory> tierFactories, List<Integer> tierExclusiveBuffers)
-
-
Method Detail
-
builder
public static TieredStorageConfiguration.Builder builder(String remoteStorageBasePath)
-
builder
public static TieredStorageConfiguration.Builder builder(int tieredStorageBufferSize, String remoteStorageBasePath)
-
getRemoteStorageBasePath
public String getRemoteStorageBasePath()
Get the base path on remote storage.- Returns:
- string if the remote storage path is configured otherwise null.
-
getTieredStorageBufferSize
public int getTieredStorageBufferSize()
Get the buffer size in tiered storage.- Returns:
- the buffer size.
-
getMemoryTierExclusiveBuffers
public int getMemoryTierExclusiveBuffers()
Get exclusive buffer number of memory tier.- Returns:
- the buffer number.
-
getDiskTierExclusiveBuffers
public int getDiskTierExclusiveBuffers()
Get exclusive buffer number of disk tier.- Returns:
- the buffer number.
-
getRemoteTierExclusiveBuffers
public int getRemoteTierExclusiveBuffers()
Get exclusive buffer number of remote tier.- Returns:
- the buffer number.
-
getAccumulatorExclusiveBuffers
public int getAccumulatorExclusiveBuffers()
Get exclusive buffer number of accumulator.The buffer number is used to compare with the subpartition number to determine the type of
BufferAccumulator.If the exclusive buffer number is larger than (subpartitionNum + 1), the accumulator will use
HashBufferAccumulator. If the exclusive buffer number is equal to or smaller than (subpartitionNum + 1), the accumulator will useSortBufferAccumulator- Returns:
- the buffer number.
-
getMemoryTierNumBytesPerSegment
public int getMemoryTierNumBytesPerSegment()
Get the segment size of memory tier.- Returns:
- segment size.
-
getDiskTierNumBytesPerSegment
public int getDiskTierNumBytesPerSegment()
Get the segment size of disk tier.- Returns:
- segment size.
-
getRemoteTierNumBytesPerSegment
public int getRemoteTierNumBytesPerSegment()
Get the segment size of remote tier.- Returns:
- segment size.
-
getNumBuffersTriggerFlushRatio
public float getNumBuffersTriggerFlushRatio()
When the number of buffers that have been requested exceeds this threshold, trigger the flushing operation in eachTierProducerAgent.- Returns:
- flush ratio.
-
getDiskIOSchedulerBufferRequestTimeout
public java.time.Duration getDiskIOSchedulerBufferRequestTimeout()
Maximum time to wait when requesting read buffers from the buffer pool before throwing an exception inDiskIOScheduler.- Returns:
- timeout duration.
-
getMinReserveDiskSpaceFraction
public float getMinReserveDiskSpaceFraction()
Minimum reserved disk space fraction in disk tier.- Returns:
- the fraction.
-
getTotalExclusiveBufferNum
public int getTotalExclusiveBufferNum()
Get the total exclusive buffer number.- Returns:
- the total exclusive buffer number.
-
getEachTierExclusiveBufferNum
public List<Integer> getEachTierExclusiveBufferNum()
Get exclusive buffer number of each tier.- Returns:
- buffer number of each tier.
-
getTierFactories
public List<TierFactory> getTierFactories()
-
-