public class OpaquePartitionedTridentSpoutExecutor.Emitter extends Object implements ICommitterTridentSpout.Emitter
| Constructor and Description |
|---|
Emitter(String txStateId,
Map<String,Object> conf,
TopologyContext context) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release any resources held by this emitter.
|
void |
commit(TransactionAttempt attempt) |
void |
emitBatch(TransactionAttempt tx,
Object coordinatorMeta,
TridentCollector collector)
Emit a batch for the specified transaction attempt and metadata for the transaction.
|
void |
success(TransactionAttempt tx)
This attempt committed successfully, so all state for this commit and before can be safely cleaned up.
|
String |
toString() |
public Emitter(String txStateId, Map<String,Object> conf, TopologyContext context)
public void emitBatch(TransactionAttempt tx, Object coordinatorMeta, TridentCollector collector)
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.
emitBatch in interface ITridentSpout.Emittertx - transaction idcoordinatorMeta - metadata from the coordinator defining this transactioncollector - output tuple collectorpublic void success(TransactionAttempt tx)
ITridentSpout.EmitterThis attempt committed successfully, so all state for this commit and before can be safely cleaned up.
success in interface ITridentSpout.Emittertx - attempt object containing transaction id and attempt numberpublic void commit(TransactionAttempt attempt)
commit in interface ICommitterTridentSpout.Emitterpublic void close()
ITridentSpout.EmitterRelease any resources held by this emitter.
close in interface ITridentSpout.EmitterCopyright © 2021 The Apache Software Foundation. All rights reserved.