public class HsFullSpillingStrategy extends Object implements HsSpillingStrategy
HsSpillingStrategy
that spilled all buffers to disk.HsSpillingStrategy.Decision
Constructor and Description |
---|
HsFullSpillingStrategy(HybridShuffleConfiguration hybridShuffleConfiguration) |
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.
|
public HsFullSpillingStrategy(HybridShuffleConfiguration hybridShuffleConfiguration)
public Optional<HsSpillingStrategy.Decision> onBufferFinished(int numTotalUnSpillBuffers, int currentPoolSize)
HsSpillingStrategy
onBufferFinished
in interface HsSpillingStrategy
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.public Optional<HsSpillingStrategy.Decision> onBufferConsumed(BufferIndexAndChannel consumedBuffer)
HsSpillingStrategy
onBufferConsumed
in interface HsSpillingStrategy
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.public Optional<HsSpillingStrategy.Decision> onMemoryUsageChanged(int numTotalRequestedBuffers, int currentPoolSize)
HsSpillingStrategy
onMemoryUsageChanged
in interface HsSpillingStrategy
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.public HsSpillingStrategy.Decision decideActionWithGlobalInfo(HsSpillingInfoProvider spillingInfoProvider)
HsSpillingStrategy
HsSpillingInfoProvider
, the caller should take care of the thread safety.decideActionWithGlobalInfo
in interface HsSpillingStrategy
spillingInfoProvider
- that provides information about the current status.HsSpillingStrategy.Decision
based on the global information.public HsSpillingStrategy.Decision onResultPartitionClosed(HsSpillingInfoProvider spillingInfoProvider)
HsSpillingStrategy
HsSpillingInfoProvider
, the caller should take care of the thread safety.onResultPartitionClosed
in interface HsSpillingStrategy
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.