use of org.apache.storm.eventhubs.spout.EventHubSpout in project storm by apache.
the class EventCount method runScenario.
protected void runScenario(String[] args) throws Exception {
readEHConfig(args);
EventHubSpout eventHubSpout = createEventHubSpout();
StormTopology topology = buildTopology(eventHubSpout);
submitTopology(args, topology);
}
use of org.apache.storm.eventhubs.spout.EventHubSpout in project storm by apache.
the class AtMostOnceEventCount method createEventHubSpout.
@Override
protected EventHubSpout createEventHubSpout() {
IPartitionManagerFactory pmFactory = new IPartitionManagerFactory() {
private static final long serialVersionUID = 1L;
@Override
public IPartitionManager create(EventHubSpoutConfig spoutConfig, String partitionId, IStateStore stateStore, IEventHubReceiver receiver) {
return new SimplePartitionManager(spoutConfig, partitionId, stateStore, receiver);
}
};
EventHubSpout eventHubSpout = new EventHubSpout(spoutConfig, null, pmFactory, null);
return eventHubSpout;
}
Aggregations