Package org.apache.storm.trident.spout
Class OpaquePartitionedTridentSpoutExecutor.Emitter
- java.lang.Object
-
- org.apache.storm.trident.spout.OpaquePartitionedTridentSpoutExecutor.Emitter
-
- All Implemented Interfaces:
ICommitterTridentSpout.Emitter,ITridentSpout.Emitter
- Enclosing class:
- OpaquePartitionedTridentSpoutExecutor
public class OpaquePartitionedTridentSpoutExecutor.Emitter extends Object implements ICommitterTridentSpout.Emitter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Release any resources held by this emitter.voidcommit(TransactionAttempt attempt)voidemitBatch(TransactionAttempt tx, Object coordinatorMeta, TridentCollector collector)Emit a batch for the specified transaction attempt and metadata for the transaction.voidsuccess(TransactionAttempt tx)This attempt committed successfully, so all state for this commit and before can be safely cleaned up.StringtoString()
-
-
-
Constructor Detail
-
Emitter
public Emitter(String txStateId, Map<String,Object> conf, TopologyContext context)
-
-
Method Detail
-
emitBatch
public void emitBatch(TransactionAttempt tx, Object coordinatorMeta, TridentCollector collector)
Description copied from interface:ITridentSpout.EmitterEmit 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:
emitBatchin interfaceITridentSpout.Emitter- Parameters:
tx- transaction idcoordinatorMeta- metadata from the coordinator defining this transactioncollector- output tuple collector
-
success
public void success(TransactionAttempt tx)
Description copied from interface:ITridentSpout.EmitterThis attempt committed successfully, so all state for this commit and before can be safely cleaned up.- Specified by:
successin interfaceITridentSpout.Emitter- Parameters:
tx- attempt object containing transaction id and attempt number
-
commit
public void commit(TransactionAttempt attempt)
- Specified by:
commitin interfaceICommitterTridentSpout.Emitter
-
close
public void close()
Description copied from interface:ITridentSpout.EmitterRelease any resources held by this emitter.- Specified by:
closein interfaceITridentSpout.Emitter
-
-