Class TridentEsTopology.FixedBatchSpout
java.lang.Object
org.apache.storm.elasticsearch.trident.TridentEsTopology.FixedBatchSpout
- All Implemented Interfaces:
Serializable,IBatchSpout,ITridentDataSource
- Enclosing class:
- TridentEsTopology
A fixed batch spout.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidack(long batchId) Acknowledges the message with idmsgId.voidclose()Closes the spout.voidemitBatch(long batchId, TridentCollector collector) Emits a batch.Get the component configuration.Gets the output fields.voidopen(Map<String, Object> conf, TopologyContext context) Opens the spout.
-
Constructor Details
-
FixedBatchSpout
public FixedBatchSpout(int maxBatchSizeArg) Creates a new fixed batch spout.- Parameters:
maxBatchSizeArg- the maximum batch size to set
-
-
Method Details
-
getOutputFields
Gets the output fields.- Specified by:
getOutputFieldsin interfaceIBatchSpout- Returns:
- the output fields.
-
open
Opens the spout.- Specified by:
openin interfaceIBatchSpout- Parameters:
conf- the configuration to use for openingcontext- the context to use for opening
-
emitBatch
Emits a batch.- Specified by:
emitBatchin interfaceIBatchSpout- Parameters:
batchId- the batch id to usecollector- the collector to emit to
-
ack
public void ack(long batchId) Acknowledges the message with idmsgId.- Specified by:
ackin interfaceIBatchSpout- Parameters:
batchId- the message id
-
close
public void close()Closes the spout.- Specified by:
closein interfaceIBatchSpout
-
getComponentConfiguration
Get the component configuration.- Specified by:
getComponentConfigurationin interfaceIBatchSpout- Returns:
- the component configuration
-