Interface HsSpillingInfoProvider
-
- All Known Implementing Classes:
HsMemoryDataManager
public interface HsSpillingInfoProviderThis component is responsible for providing some information needed for the spill decision.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHsSpillingInfoProvider.ConsumeStatusThis enum represents buffer status of consume in hybrid shuffle mode.static classHsSpillingInfoProvider.ConsumeStatusWithIdThis class represents a pair ofHsSpillingInfoProvider.ConsumeStatusand consumer id.static classHsSpillingInfoProvider.SpillStatusThis enum represents buffer status of spill in hybrid shuffle mode.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Deque<BufferIndexAndChannel>getBuffersInOrder(int subpartitionId, HsSpillingInfoProvider.SpillStatus spillStatus, HsSpillingInfoProvider.ConsumeStatusWithId consumeStatusWithId)Get all buffers with the expected status from the subpartition.List<Integer>getNextBufferIndexToConsume(HsConsumerId consumerId)Get all subpartition's next buffer index to consume of specific consumer.intgetNumSubpartitions()Get the number of downstream consumers.intgetNumTotalRequestedBuffers()Get total number of buffers requested from buffer pool.intgetNumTotalUnSpillBuffers()Get total number of not decided to spill buffers.intgetPoolSize()Get the current size of buffer pool.
-
-
-
Method Detail
-
getNumSubpartitions
int getNumSubpartitions()
Get the number of downstream consumers.- Returns:
- Number of subpartitions.
-
getNextBufferIndexToConsume
List<Integer> getNextBufferIndexToConsume(HsConsumerId consumerId)
Get all subpartition's next buffer index to consume of specific consumer.- Parameters:
consumerId- of the target downstream consumer.- Returns:
- A list containing all subpartition's next buffer index to consume of specific consumer, if the downstream subpartition view has not been registered, the corresponding return value is -1.
-
getBuffersInOrder
Deque<BufferIndexAndChannel> getBuffersInOrder(int subpartitionId, HsSpillingInfoProvider.SpillStatus spillStatus, HsSpillingInfoProvider.ConsumeStatusWithId consumeStatusWithId)
Get all buffers with the expected status from the subpartition.- Parameters:
subpartitionId- target buffers belong to.spillStatus- expected buffer spill status.consumeStatusWithId- expected buffer consume status and consumer id.- Returns:
- all buffers satisfy specific status of this subpartition, This queue must be sorted according to bufferIndex from small to large, in other words, head is the buffer with the minimum bufferIndex in the current subpartition.
-
getNumTotalUnSpillBuffers
int getNumTotalUnSpillBuffers()
Get total number of not decided to spill buffers.
-
getNumTotalRequestedBuffers
int getNumTotalRequestedBuffers()
Get total number of buffers requested from buffer pool.
-
getPoolSize
int getPoolSize()
Get the current size of buffer pool.
-
-