Search in sources :

Example 1 with ThroughputCounter

use of org.apache.apex.malhar.lib.testbench.ThroughputCounter in project apex-malhar by apache.

the class ThroughputCounterApp method populateDAG.

@Override
public void populateDAG(DAG dag, Configuration conf) {
    ThroughputCounter counter = dag.addOperator("counter", new ThroughputCounter());
    HashMapOperator oper = dag.addOperator("oper", new HashMapOperator());
    DevNull<HashMap<String, Number>> dev = dag.addOperator("dev", new DevNull());
    dag.addStream("count1", oper.hmapInt_data, counter.data).setLocality(locality);
    dag.addStream("count2", counter.count, dev.data).setLocality(locality);
}
Also used : ThroughputCounter(org.apache.apex.malhar.lib.testbench.ThroughputCounter) HashMap(java.util.HashMap) DevNull(org.apache.apex.malhar.lib.stream.DevNull)

Aggregations

HashMap (java.util.HashMap)1 DevNull (org.apache.apex.malhar.lib.stream.DevNull)1 ThroughputCounter (org.apache.apex.malhar.lib.testbench.ThroughputCounter)1