Package org.apache.storm.starter.spout
Class RandomNumberGeneratorSpout
java.lang.Object
org.apache.storm.starter.spout.RandomNumberGeneratorSpout
- All Implemented Interfaces:
Serializable
,IBatchSpout
,ITridentDataSource
This spout generates random whole numbers with given
maxNumber
value as maximum with the given fields
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ack
(long batchId) void
close()
void
emitBatch
(long batchId, TridentCollector collector) void
open
(Map<String, Object> conf, TopologyContext context)
-
Constructor Details
-
RandomNumberGeneratorSpout
-
-
Method Details
-
open
- Specified by:
open
in interfaceIBatchSpout
-
emitBatch
- Specified by:
emitBatch
in interfaceIBatchSpout
-
ack
public void ack(long batchId) - Specified by:
ack
in interfaceIBatchSpout
-
close
public void close()- Specified by:
close
in interfaceIBatchSpout
-
getComponentConfiguration
- Specified by:
getComponentConfiguration
in interfaceIBatchSpout
-
getOutputFields
- Specified by:
getOutputFields
in interfaceIBatchSpout
-