use of org.apache.apex.malhar.lib.testbench.EventGenerator in project apex-malhar by apache.
the class EventGeneratorApp method populateDAG.
@Override
public void populateDAG(DAG dag, Configuration conf) {
EventGenerator eventGenerator = dag.addOperator("eventGenerator", new EventGenerator());
dag.getMeta(eventGenerator).getMeta(eventGenerator.count).getAttributes().put(PortContext.QUEUE_CAPACITY, QUEUE_CAPACITY);
DevNull<String> devString = dag.addOperator("devString", new DevNull());
DevNull<HashMap<String, Double>> devMap = dag.addOperator("devMap", new DevNull());
DevNull<HashMap<String, Number>> devInt = dag.addOperator("devInt", new DevNull());
dag.addStream("EventGenString", eventGenerator.string_data, devString.data).setLocality(locality);
dag.addStream("EventGenMap", eventGenerator.hash_data, devMap.data).setLocality(locality);
dag.addStream("EventGenInt", eventGenerator.count, devInt.data).setLocality(locality);
}
Aggregations