Search in sources :

Example 66 with DAG

use of com.datatorrent.api.DAG in project apex-malhar by apache.

the class WindowedOperatorBenchmarkAppTest method test.

@Test
public void test() throws Exception {
    Configuration conf = new Configuration(false);
    LocalMode lma = LocalMode.newInstance();
    DAG dag = lma.getDAG();
    super.populateDAG(dag, conf);
    StreamingApplication app = new StreamingApplication() {

        @Override
        public void populateDAG(DAG dag, Configuration conf) {
        }
    };
    lma.prepareDAG(app, conf);
    // Create local cluster
    final LocalMode.Controller lc = lma.getController();
    lc.run(3000000);
    lc.shutdown();
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) LocalMode(com.datatorrent.api.LocalMode) DAG(com.datatorrent.api.DAG) StreamingApplication(com.datatorrent.api.StreamingApplication) Test(org.junit.Test)

Aggregations

DAG (com.datatorrent.api.DAG)66 LocalMode (com.datatorrent.api.LocalMode)44 Test (org.junit.Test)44 Configuration (org.apache.hadoop.conf.Configuration)26 StreamingApplication (com.datatorrent.api.StreamingApplication)21 CountDownLatch (java.util.concurrent.CountDownLatch)13 Properties (java.util.Properties)11 Map (java.util.Map)7 StramLocalCluster (com.datatorrent.stram.StramLocalCluster)6 Pipeline (org.apache.beam.sdk.Pipeline)6 Integer2String (com.datatorrent.api.StringCodec.Integer2String)5 HashMap (java.util.HashMap)5 AttributeMap (com.datatorrent.api.Attribute.AttributeMap)4 File (java.io.File)4 IOException (java.io.IOException)4 FSWindowDataManager (org.apache.apex.malhar.lib.wal.FSWindowDataManager)4 ApexPipelineOptions (org.apache.beam.runners.apex.ApexPipelineOptions)4 Attribute (com.datatorrent.api.Attribute)3 GenericTestOperator (com.datatorrent.stram.engine.GenericTestOperator)3 ArrayList (java.util.ArrayList)3