public class FeederBatchSpout extends Object implements ITridentSpout, IFeeder
Modifier and Type | Class and Description |
---|---|
class |
FeederBatchSpout.FeederCoordinator |
ITridentSpout.BatchCoordinator<X>, ITridentSpout.Emitter<X>
Constructor and Description |
---|
FeederBatchSpout(List<String> fields) |
Modifier and Type | Method and Description |
---|---|
void |
feed(Object tuples) |
Map<String,Object> |
getComponentConfiguration() |
ITridentSpout.BatchCoordinator |
getCoordinator(String txStateId,
Map conf,
TopologyContext context)
The coordinator for a TransactionalSpout runs in a single thread and indicates when batches of tuples should be emitted.
|
ITridentSpout.Emitter |
getEmitter(String txStateId,
Map conf,
TopologyContext context)
The emitter for a TransactionalSpout runs as many tasks across the cluster.
|
Fields |
getOutputFields() |
void |
setWaitToEmit(boolean trueIfWait) |
public void setWaitToEmit(boolean trueIfWait)
public Map<String,Object> getComponentConfiguration()
getComponentConfiguration
in interface ITridentSpout
public Fields getOutputFields()
getOutputFields
in interface ITridentSpout
public ITridentSpout.BatchCoordinator getCoordinator(String txStateId, Map conf, TopologyContext context)
ITridentSpout
The coordinator for a TransactionalSpout runs in a single thread and indicates when batches of tuples should be emitted. The Coordinator that you provide in a TransactionalSpout provides metadata for each transaction so that the transactions can be replayed in case of failure.
Two instances are requested, one on the master batch coordinator where isReady() is called, and an instance in the coordinator bolt which is used for all other operations. The two instances do not necessarily share a worker JVM.
getCoordinator
in interface ITridentSpout
txStateId
- stream idconf
- Storm config mapcontext
- topology contextpublic ITridentSpout.Emitter getEmitter(String txStateId, Map conf, TopologyContext context)
ITridentSpout
The emitter for a TransactionalSpout runs as many tasks across the cluster. Emitters are responsible for emitting batches of tuples for a transaction and must ensure that the same batch of tuples is always emitted for the same transaction id.
All emitter tasks get the same transaction metadata. The topology context parameter contains the instance task id that can be used to distribute the work across the tasks.
getEmitter
in interface ITridentSpout
txStateId
- stream idconf
- Storm config mapcontext
- topology contextCopyright © 2019 The Apache Software Foundation. All Rights Reserved.