Class RemoteTierConsumerAgent
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.hybrid.tiered.tier.remote.RemoteTierConsumerAgent
-
- All Implemented Interfaces:
TierConsumerAgent
public class RemoteTierConsumerAgent extends Object implements TierConsumerAgent
The data client is used to fetch data from remote tier.
-
-
Constructor Summary
Constructors Constructor Description RemoteTierConsumerAgent(RemoteStorageScanner remoteStorageScanner, PartitionFileReader partitionFileReader, int bufferSizeBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the consumer agent.Optional<Buffer>getNextBuffer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId, int segmentId)Get buffer from the consumer agent.voidregisterAvailabilityNotifier(AvailabilityNotifier notifier)Register the notifier to notify the availability of a subpartition.voidstart()Start the consumer agent.
-
-
-
Constructor Detail
-
RemoteTierConsumerAgent
public RemoteTierConsumerAgent(RemoteStorageScanner remoteStorageScanner, PartitionFileReader partitionFileReader, int bufferSizeBytes)
-
-
Method Detail
-
start
public void start()
Description copied from interface:TierConsumerAgentStart the consumer agent.- Specified by:
startin interfaceTierConsumerAgent
-
getNextBuffer
public Optional<Buffer> getNextBuffer(TieredStoragePartitionId partitionId, TieredStorageSubpartitionId subpartitionId, int segmentId)
Description copied from interface:TierConsumerAgentGet buffer from the consumer agent.- Specified by:
getNextBufferin interfaceTierConsumerAgent- Parameters:
partitionId- the id of partition.subpartitionId- the id of subpartition.segmentId- the id of segment.- Returns:
- buffer.
-
registerAvailabilityNotifier
public void registerAvailabilityNotifier(AvailabilityNotifier notifier)
Description copied from interface:TierConsumerAgentRegister the notifier to notify the availability of a subpartition.- Specified by:
registerAvailabilityNotifierin interfaceTierConsumerAgent- Parameters:
notifier- to notify availability.
-
close
public void close() throws IOExceptionDescription copied from interface:TierConsumerAgentClose the consumer agent.- Specified by:
closein interfaceTierConsumerAgent- Throws:
IOException
-
-