public class TieredStorageNettyServiceImpl extends Object implements TieredStorageNettyService
TieredStorageNettyService
.Constructor and Description |
---|
TieredStorageNettyServiceImpl(TieredStorageResourceRegistry resourceRegistry) |
Modifier and Type | Method and Description |
---|---|
ResultSubpartitionView |
createResultSubpartitionView(TieredStoragePartitionId partitionId,
TieredStorageSubpartitionId subpartitionId,
BufferAvailabilityListener availabilityListener)
Create a
ResultSubpartitionView for the netty server. |
CompletableFuture<NettyConnectionReader> |
registerConsumer(TieredStoragePartitionId partitionId,
TieredStorageSubpartitionId subpartitionId)
TierConsumerAgent will register to TieredStorageNettyService and get a future
of NettyConnectionReader . |
void |
registerProducer(TieredStoragePartitionId partitionId,
NettyServiceProducer serviceProducer)
TierProducerAgent will provide a callback named NettyServiceProducer to
register to TieredStorageNettyService . |
void |
setupInputChannels(List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs,
List<Supplier<InputChannel>> inputChannelProviders)
Set up input channels in
SingleInputGate . |
public TieredStorageNettyServiceImpl(TieredStorageResourceRegistry resourceRegistry)
public void registerProducer(TieredStoragePartitionId partitionId, NettyServiceProducer serviceProducer)
TieredStorageNettyService
TierProducerAgent
will provide a callback named NettyServiceProducer
to
register to TieredStorageNettyService
.registerProducer
in interface TieredStorageNettyService
partitionId
- partition id indicates the unique id of TieredResultPartition
.serviceProducer
- serviceProducer is a callback from TierProducerAgent
and used
to register a NettyConnectionWriter
and disconnect the netty connection.public CompletableFuture<NettyConnectionReader> registerConsumer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId)
TieredStorageNettyService
TierConsumerAgent
will register to TieredStorageNettyService
and get a future
of NettyConnectionReader
.registerConsumer
in interface TieredStorageNettyService
partitionId
- partition id indicates the unique id of TieredResultPartition
.subpartitionId
- subpartition id indicates the unique id of subpartition.public ResultSubpartitionView createResultSubpartitionView(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId, BufferAvailabilityListener availabilityListener)
ResultSubpartitionView
for the netty server.partitionId
- partition id indicates the unique id of TieredResultPartition
.subpartitionId
- subpartition id indicates the unique id of subpartition.availabilityListener
- listener is used to listen the available status of data.TieredStorageResultSubpartitionView
.public void setupInputChannels(List<TieredStorageConsumerSpec> tieredStorageConsumerSpecs, List<Supplier<InputChannel>> inputChannelProviders)
SingleInputGate
. The method will be invoked by the pekko rpc
thread at first, and then the method TieredStorageNettyService.registerConsumer(TieredStoragePartitionId,
TieredStorageSubpartitionId)
will be invoked by the same thread sequentially, which ensures
thread safety.tieredStorageConsumerSpecs
- specs indicates TieredResultPartition
and TieredStorageSubpartitionId
.inputChannelProviders
- it provides input channels for subpartitions.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.