Package org.apache.storm.trident.testing
Class FeederCommitterBatchSpout
java.lang.Object
org.apache.storm.trident.testing.FeederCommitterBatchSpout
- All Implemented Interfaces:
Serializable,ICommitterTridentSpout<Map<Integer,,List<List<Object>>>> ITridentDataSource,ITridentSpout<Map<Integer,,List<List<Object>>>> IFeeder
public class FeederCommitterBatchSpout
extends Object
implements ICommitterTridentSpout<Map<Integer,List<List<Object>>>>, IFeeder
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.storm.trident.spout.ICommitterTridentSpout
ICommitterTridentSpout.EmitterNested classes/interfaces inherited from interface org.apache.storm.trident.spout.ITridentSpout
ITridentSpout.BatchCoordinator<X> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetCoordinator(String txStateId, Map<String, Object> conf, TopologyContext context) The coordinator for a TransactionalSpout runs in a single thread and indicates when batches of tuples should be emitted.getEmitter(String txStateId, Map<String, Object> conf, TopologyContext context) The emitter for a TransactionalSpout runs as many tasks across the cluster.voidsetWaitToEmit(boolean trueIfWait)
-
Constructor Details
-
FeederCommitterBatchSpout
-
-
Method Details
-
setWaitToEmit
public void setWaitToEmit(boolean trueIfWait) -
getEmitter
public ICommitterTridentSpout.Emitter getEmitter(String txStateId, Map<String, Object> conf, TopologyContext context) Description copied from interface:ITridentSpoutThe 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.
- Specified by:
getEmitterin interfaceICommitterTridentSpout<Map<Integer,List<List<Object>>>> - Specified by:
getEmitterin interfaceITridentSpout<Map<Integer,List<List<Object>>>> - Parameters:
txStateId- stream idconf- Storm config mapcontext- topology context- Returns:
- spout emitter
-
getCoordinator
public ITridentSpout.BatchCoordinator<Map<Integer,List<List<Object>>>> getCoordinator(String txStateId, Map<String, Object> conf, TopologyContext context) Description copied from interface:ITridentSpoutThe 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.
- Specified by:
getCoordinatorin interfaceITridentSpout<Map<Integer,List<List<Object>>>> - Parameters:
txStateId- stream idconf- Storm config mapcontext- topology context- Returns:
- spout coordinator instance
-
getOutputFields
- Specified by:
getOutputFieldsin interfaceITridentSpout<Map<Integer,List<List<Object>>>>
-
getComponentConfiguration
- Specified by:
getComponentConfigurationin interfaceITridentSpout<Map<Integer,List<List<Object>>>>
-
feed
-