public class HsSubpartitionMemoryDataManager extends Object
HsMemoryDataManager
will hold multiple HsSubpartitionMemoryDataManager
.Modifier and Type | Method and Description |
---|---|
void |
append(ByteBuffer record,
Buffer.DataType dataType)
Append record to
HsSubpartitionMemoryDataManager . |
Deque<BufferIndexAndChannel> |
getBuffersSatisfyStatus(HsSpillingInfoProvider.SpillStatus spillStatus,
HsSpillingInfoProvider.ConsumeStatusWithId consumeStatusWithId)
Get buffers in
allBuffers that satisfy expected HsSpillingInfoProvider.SpillStatus and HsSpillingInfoProvider.ConsumeStatus . |
HsSubpartitionConsumerMemoryDataManager |
registerNewConsumer(HsConsumerId consumerId) |
void |
releaseConsumer(HsConsumerId consumerId) |
void |
releaseSubpartitionBuffers(List<BufferIndexAndChannel> toRelease)
Release this subpartition's buffers in a decision.
|
void |
setOutputMetrics(HsOutputMetrics outputMetrics) |
List<BufferWithIdentity> |
spillSubpartitionBuffers(List<BufferIndexAndChannel> toSpill,
CompletableFuture<Void> spillDoneFuture)
Spill this subpartition's buffers in a decision.
|
public void append(ByteBuffer record, Buffer.DataType dataType) throws InterruptedException
HsSubpartitionMemoryDataManager
.record
- to be managed by this class.dataType
- the type of this record. In other words, is it data or event.InterruptedException
public Deque<BufferIndexAndChannel> getBuffersSatisfyStatus(HsSpillingInfoProvider.SpillStatus spillStatus, HsSpillingInfoProvider.ConsumeStatusWithId consumeStatusWithId)
allBuffers
that satisfy expected HsSpillingInfoProvider.SpillStatus
and HsSpillingInfoProvider.ConsumeStatus
.spillStatus
- the status of spilling expected.consumeStatusWithId
- the status and consumerId expected.public List<BufferWithIdentity> spillSubpartitionBuffers(List<BufferIndexAndChannel> toSpill, CompletableFuture<Void> spillDoneFuture)
toSpill
- All buffers that need to be spilled belong to this subpartition in a decision.spillDoneFuture
- completed when spill is finished.BufferWithIdentity
s about these spill buffers.public void releaseSubpartitionBuffers(List<BufferIndexAndChannel> toRelease)
toRelease
- All buffers that need to be released belong to this subpartition in a
decision.public void setOutputMetrics(HsOutputMetrics outputMetrics)
public HsSubpartitionConsumerMemoryDataManager registerNewConsumer(HsConsumerId consumerId)
public void releaseConsumer(HsConsumerId consumerId)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.