Search in sources :

Example 11 with DevNull

use of org.apache.apex.malhar.lib.stream.DevNull 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

DevNull (org.apache.apex.malhar.lib.stream.DevNull)11 HashMap (java.util.HashMap)7 ArrayList (java.util.ArrayList)4 DAG (com.datatorrent.api.DAG)1 StatsListener (com.datatorrent.api.StatsListener)1 StreamDuplicater (org.apache.apex.malhar.lib.stream.StreamDuplicater)1 EventClassifier (org.apache.apex.malhar.lib.testbench.EventClassifier)1 EventGenerator (org.apache.apex.malhar.lib.testbench.EventGenerator)1 EventIncrementer (org.apache.apex.malhar.lib.testbench.EventIncrementer)1 FilterClassifier (org.apache.apex.malhar.lib.testbench.FilterClassifier)1 FilteredEventClassifier (org.apache.apex.malhar.lib.testbench.FilteredEventClassifier)1 RandomEventGenerator (org.apache.apex.malhar.lib.testbench.RandomEventGenerator)1 SeedEventGenerator (org.apache.apex.malhar.lib.testbench.SeedEventGenerator)1 ThroughputCounter (org.apache.apex.malhar.lib.testbench.ThroughputCounter)1 KeyValPair (org.apache.apex.malhar.lib.util.KeyValPair)1