Package org.apache.storm.trident.spout
Interface IOpaquePartitionedTridentSpout.Coordinator<PartitionsT>
-
- Type Parameters:
PartitionsT
- The type of metadata object used by the coordinator to describe partitions. This type must be JSON serializable by json-simple.
- All Known Implementing Classes:
KafkaTridentSpoutCoordinator
- Enclosing interface:
- IOpaquePartitionedTridentSpout<PartitionsT,PartitionT extends ISpoutPartition,M>
public static interface IOpaquePartitionedTridentSpout.Coordinator<PartitionsT>
Coordinator for batches. Trident will only begin committing once at least one coordinator is ready.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
PartitionsT
getPartitionsForBatch()
Gets the partitions for the following batches.boolean
isReady(long txid)
Indicates whether this coordinator is ready to commit the given transaction.
-
-
-
Method Detail
-
isReady
boolean isReady(long txid)
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.- Parameters:
txid
- The transaction id- Returns:
- true if this coordinator is ready to commit, false otherwise.
-
getPartitionsForBatch
PartitionsT getPartitionsForBatch()
Gets the partitions for the following batches. The emitter will be asked to refresh partitions when this value changes.- Returns:
- The partitions for the following batches.
-
close
void close()
-
-