public class RandomNumberGeneratorSpout extends Object implements IBatchSpout
This spout generates random whole numbers with given maxNumber value as maximum with the given fields.
| Constructor and Description |
|---|
RandomNumberGeneratorSpout(Fields fields,
int batchSize,
int maxNumber) |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(long batchId) |
void |
close() |
void |
emitBatch(long batchId,
TridentCollector collector) |
Map<String,Object> |
getComponentConfiguration() |
Fields |
getOutputFields() |
void |
open(Map conf,
TopologyContext context) |
public RandomNumberGeneratorSpout(Fields fields, int batchSize, int maxNumber)
public void open(Map conf, TopologyContext context)
open in interface IBatchSpoutpublic void emitBatch(long batchId,
TridentCollector collector)
emitBatch in interface IBatchSpoutpublic void ack(long batchId)
ack in interface IBatchSpoutpublic void close()
close in interface IBatchSpoutpublic Map<String,Object> getComponentConfiguration()
getComponentConfiguration in interface IBatchSpoutpublic Fields getOutputFields()
getOutputFields in interface IBatchSpoutCopyright © 2019 The Apache Software Foundation. All Rights Reserved.