Interface HsMemoryDataManagerOperation
-
- All Known Implementing Classes:
HsMemoryDataManager
public interface HsMemoryDataManagerOperationThis interface is used byHsSubpartitionMemoryDataManagerto operateHsMemoryDataManager. Spilling decision may be made and handled inside these operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidmarkBufferReleasedFromFile(int subpartitionId, int bufferIndex)This method is called when buffer should mark as released inHsFileDataIndex.voidonBufferConsumed(BufferIndexAndChannel consumedBuffer)This method is called when buffer is consumed.voidonBufferFinished()This method is called when buffer is finished.voidonConsumerReleased(int subpartitionId, HsConsumerId consumerId)This method is called when consumer is decided to released.voidonDataAvailable(int subpartitionId, Collection<HsConsumerId> consumerIds)This method is called when subpartition data become available.BufferBuilderrequestBufferFromPool()Request buffer from buffer pool.
-
-
-
Method Detail
-
requestBufferFromPool
BufferBuilder requestBufferFromPool() throws InterruptedException
Request buffer from buffer pool.- Returns:
- requested buffer.
- Throws:
InterruptedException
-
markBufferReleasedFromFile
void markBufferReleasedFromFile(int subpartitionId, int bufferIndex)This method is called when buffer should mark as released inHsFileDataIndex.- Parameters:
subpartitionId- the subpartition that target buffer belong to.bufferIndex- index of buffer to mark as released.
-
onBufferConsumed
void onBufferConsumed(BufferIndexAndChannel consumedBuffer)
This method is called when buffer is consumed.- Parameters:
consumedBuffer- target buffer to mark as consumed.
-
onBufferFinished
void onBufferFinished()
This method is called when buffer is finished.
-
onDataAvailable
void onDataAvailable(int subpartitionId, Collection<HsConsumerId> consumerIds)This method is called when subpartition data become available.- Parameters:
subpartitionId- the subpartition's identifier that this consumer belongs to.consumerIds- the consumer's identifier which need notify data available.
-
onConsumerReleased
void onConsumerReleased(int subpartitionId, HsConsumerId consumerId)This method is called when consumer is decided to released.- Parameters:
subpartitionId- the subpartition's identifier that this consumer belongs to.consumerId- the consumer's identifier which decided to be released.
-
-