public static class TridentEsTopology.FixedBatchSpout extends Object implements IBatchSpout
A fixed batch spout.
Constructor and Description |
---|
FixedBatchSpout(int maxBatchSizeArg)
Creates a new fixed batch spout.
|
Modifier and Type | Method and Description |
---|---|
void |
ack(long batchId)
Acknowledges the message with id
msgId . |
void |
close()
Closes the spout.
|
void |
emitBatch(long batchId,
TridentCollector collector)
Emits a batch.
|
Map<String,Object> |
getComponentConfiguration()
Get the component configuration.
|
Fields |
getOutputFields()
Gets the output fields.
|
void |
open(Map<String,Object> conf,
TopologyContext context)
Opens the spout.
|
public FixedBatchSpout(int maxBatchSizeArg)
Creates a new fixed batch spout.
maxBatchSizeArg
- the maximum batch size to setpublic Fields getOutputFields()
Gets the output fields.
getOutputFields
in interface IBatchSpout
public void open(Map<String,Object> conf, TopologyContext context)
Opens the spout.
open
in interface IBatchSpout
conf
- the configuration to use for openingcontext
- the context to use for openingpublic void emitBatch(long batchId, TridentCollector collector)
Emits a batch.
emitBatch
in interface IBatchSpout
batchId
- the batch id to usecollector
- the collector to emit topublic void ack(long batchId)
Acknowledges the message with id msgId
.
ack
in interface IBatchSpout
batchId
- the message idpublic void close()
Closes the spout.
close
in interface IBatchSpout
public Map<String,Object> getComponentConfiguration()
Get the component configuration.
getComponentConfiguration
in interface IBatchSpout
Copyright © 2019 The Apache Software Foundation. All rights reserved.