public interface HsSpillingStrategy
Note: decideActionWithGlobalInfo(org.apache.flink.runtime.io.network.partition.hybrid.HsSpillingInfoProvider)
is usually expensive, in the sense of both the
computation complexity of the strategy algorithm and the synchronization overhead for providing
the global information. Thus, it should only be called when global information is needed.
Modifier and Type | Interface and Description |
---|---|
static class |
HsSpillingStrategy.Decision
This class represents the spill and release decision made by
HsSpillingStrategy , in
other words, which data is to be spilled and which data is to be released. |
Modifier and Type | Method and Description |
---|---|
HsSpillingStrategy.Decision |
decideActionWithGlobalInfo(HsSpillingInfoProvider spillingInfoProvider)
Make a decision based on global information.
|
Optional<HsSpillingStrategy.Decision> |
onBufferConsumed(BufferIndexAndChannel consumedBuffer)
Make a decision when a buffer is consumed.
|
Optional<HsSpillingStrategy.Decision> |
onBufferFinished(int numTotalUnSpillBuffers,
int currentPoolSize)
Make a decision when a buffer becomes finished.
|
Optional<HsSpillingStrategy.Decision> |
onMemoryUsageChanged(int numTotalRequestedBuffers,
int currentPoolSize)
Make a decision when memory usage is changed.
|
HsSpillingStrategy.Decision |
onResultPartitionClosed(HsSpillingInfoProvider spillingInfoProvider)
Make a decision when result partition is closed.
|
Optional<HsSpillingStrategy.Decision> onMemoryUsageChanged(int numTotalRequestedBuffers, int currentPoolSize)
numTotalRequestedBuffers
- total number of buffers requested.currentPoolSize
- current value of buffer pool size.HsSpillingStrategy.Decision
based on the provided information, or Optional.empty()
if
the decision cannot be made, which indicates global information is needed.Optional<HsSpillingStrategy.Decision> onBufferFinished(int numTotalUnSpillBuffers, int currentPoolSize)
numTotalUnSpillBuffers
- total number of buffers not spill.HsSpillingStrategy.Decision
based on the provided information, or Optional.empty()
if
the decision cannot be made, which indicates global information is needed.Optional<HsSpillingStrategy.Decision> onBufferConsumed(BufferIndexAndChannel consumedBuffer)
consumedBuffer
- the buffer that is consumed.HsSpillingStrategy.Decision
based on the provided information, or Optional.empty()
if
the decision cannot be made, which indicates global information is needed.HsSpillingStrategy.Decision decideActionWithGlobalInfo(HsSpillingInfoProvider spillingInfoProvider)
HsSpillingInfoProvider
, the caller should take care of the thread safety.spillingInfoProvider
- that provides information about the current status.HsSpillingStrategy.Decision
based on the global information.HsSpillingStrategy.Decision onResultPartitionClosed(HsSpillingInfoProvider spillingInfoProvider)
HsSpillingInfoProvider
, the caller should take care of the thread safety.spillingInfoProvider
- that provides information about the current status.HsSpillingStrategy.Decision
based on the global information.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.