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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ack
(long batchId) Acknowledges the message with idmsgId
.void
close()
Closes the spout.void
emitBatch
(long batchId, TridentCollector collector) Emits a batch.Get the component configuration.Gets the output fields.void
open
(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:
getOutputFields
in interfaceIBatchSpout
- Returns:
- the output fields.
-
open
Opens the spout.- Specified by:
open
in interfaceIBatchSpout
- Parameters:
conf
- the configuration to use for openingcontext
- the context to use for opening
-
emitBatch
Emits a batch.- Specified by:
emitBatch
in 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:
ack
in interfaceIBatchSpout
- Parameters:
batchId
- the message id
-
close
public void close()Closes the spout.- Specified by:
close
in interfaceIBatchSpout
-
getComponentConfiguration
Get the component configuration.- Specified by:
getComponentConfiguration
in interfaceIBatchSpout
- Returns:
- the component configuration
-