public static class BatchSpoutExecutor.EmptyCoordinator extends Object implements ITridentSpout.BatchCoordinator<Object>
Constructor and Description |
---|
EmptyCoordinator() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Release any resources from this coordinator.
|
Object |
initializeTransaction(long txid,
Object prevMetadata,
Object currMetadata)
Create metadata for this particular transaction id which has never been emitted before.
|
boolean |
isReady(long txid)
hint to Storm if the spout is ready for the transaction id.
|
void |
success(long txid)
This attempt committed successfully, so all state for this commit and before can be safely cleaned up.
|
public Object initializeTransaction(long txid, Object prevMetadata, Object currMetadata)
ITridentSpout.BatchCoordinator
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 JSON encoding to store the metadata. Only simple types such as numbers, booleans, strings, lists, and maps should be used.
initializeTransaction
in interface ITridentSpout.BatchCoordinator<Object>
txid
- The id of the transaction.prevMetadata
- The metadata of the previous transactioncurrMetadata
- The metadata for this transaction the last time it was initialized. null if this is the first attemptpublic void close()
ITridentSpout.BatchCoordinator
Release any resources from this coordinator.
close
in interface ITridentSpout.BatchCoordinator<Object>
public void success(long txid)
ITridentSpout.BatchCoordinator
This attempt committed successfully, so all state for this commit and before can be safely cleaned up.
success
in interface ITridentSpout.BatchCoordinator<Object>
txid
- transaction id that completedpublic boolean isReady(long txid)
ITridentSpout.BatchCoordinator
hint to Storm if the spout is ready for the transaction id.
isReady
in interface ITridentSpout.BatchCoordinator<Object>
txid
- the id of the transactionCopyright © 2022 The Apache Software Foundation. All rights reserved.