storm.trident.spout
Interface ITridentSpout.BatchCoordinator<X>
- All Known Implementing Classes:
- BatchSpoutExecutor.EmptyCoordinator, FeederBatchSpout.FeederCoordinator, OpaquePartitionedTridentSpoutExecutor.Coordinator
- Enclosing interface:
- ITridentSpout<T>
public static interface ITridentSpout.BatchCoordinator<X>
Method Summary |
void |
close()
Release any resources from this coordinator. |
X |
initializeTransaction(long txid,
X prevMetadata)
Create metadata for this particular transaction id which has never
been emitted before. |
boolean |
isReady(long txid)
|
void |
success(long txid)
|
initializeTransaction
X initializeTransaction(long txid,
X prevMetadata)
- Create metadata for this particular transaction id which has never
been emitted before. The metadata should contain whatever is necessary
to be able to replay the exact batch for the transaction at a later point.
The metadata is stored in Zookeeper.
Storm uses the Kryo serializations configured in the component configuration
for this spout to serialize and deserialize the metadata.
- Parameters:
txid
- The id of the transaction.prevMetadata
- The metadata of the previous transaction
- Returns:
- the metadata for this new transaction
success
void success(long txid)
isReady
boolean isReady(long txid)
close
void close()
- Release any resources from this coordinator.