public class Coordinator extends Object implements IPartitionedTridentSpout.Coordinator<Partitions>, IOpaquePartitionedTridentSpout.Coordinator<Partitions>
Constructor and Description |
---|
Coordinator(EventHubSpoutConfig spoutConfig) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Partitions |
getPartitionsForBatch()
Return the partitions currently in the source of data.
|
boolean |
isReady(long txid)
Indicates whether this coordinator is ready to commit the given transaction.
|
public Coordinator(EventHubSpoutConfig spoutConfig)
public void close()
close
in interface IOpaquePartitionedTridentSpout.Coordinator<Partitions>
close
in interface IPartitionedTridentSpout.Coordinator<Partitions>
public Partitions getPartitionsForBatch()
IPartitionedTridentSpout.Coordinator
Return the partitions currently in the source of data. The idea is is that if a new partition is added and a prior transaction is replayed, it doesn’t emit tuples for the new partition because it knows what partitions were in that transaction.
getPartitionsForBatch
in interface IOpaquePartitionedTridentSpout.Coordinator<Partitions>
getPartitionsForBatch
in interface IPartitionedTridentSpout.Coordinator<Partitions>
public boolean isReady(long txid)
IOpaquePartitionedTridentSpout.Coordinator
Indicates whether this coordinator is ready to commit the given transaction. The master batch coordinator will only begin committing if at least one coordinator indicates it is ready to commit.
isReady
in interface IOpaquePartitionedTridentSpout.Coordinator<Partitions>
isReady
in interface IPartitionedTridentSpout.Coordinator<Partitions>
txid
- The transaction idCopyright © 2022 The Apache Software Foundation. All rights reserved.