Package org.apache.storm.trident.spout
Class BatchSpoutExecutor.BatchSpoutEmitter
java.lang.Object
org.apache.storm.trident.spout.BatchSpoutExecutor.BatchSpoutEmitter
- All Implemented Interfaces:
ITridentSpout.Emitter<Object>
- Enclosing class:
- BatchSpoutExecutor
public class BatchSpoutExecutor.BatchSpoutEmitter
extends Object
implements ITridentSpout.Emitter<Object>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Release any resources held by this emitter.void
emitBatch
(TransactionAttempt tx, Object coordinatorMeta, TridentCollector collector) Emit a batch for the specified transaction attempt and metadata for the transaction.void
This attempt committed successfully, so all state for this commit and before can be safely cleaned up.
-
Constructor Details
-
BatchSpoutEmitter
public BatchSpoutEmitter()
-
-
Method Details
-
emitBatch
Description copied from interface:ITridentSpout.Emitter
Emit a batch for the specified transaction attempt and metadata for the transaction. The metadata was created by the Coordinator in the initializeTransaction method. This method must always emit the same batch of tuples across all tasks for the same transaction id.- Specified by:
emitBatch
in interfaceITridentSpout.Emitter<Object>
- Parameters:
tx
- transaction idcoordinatorMeta
- metadata from the coordinator defining this transactioncollector
- output tuple collector
-
success
Description copied from interface:ITridentSpout.Emitter
This attempt committed successfully, so all state for this commit and before can be safely cleaned up.- Specified by:
success
in interfaceITridentSpout.Emitter<Object>
- Parameters:
tx
- attempt object containing transaction id and attempt number
-
close
public void close()Description copied from interface:ITridentSpout.Emitter
Release any resources held by this emitter.- Specified by:
close
in interfaceITridentSpout.Emitter<Object>
-