use of com.datatorrent.stram.plan.SchemaTestOperator in project apex-core by apache.
the class LogicalPlanConfigurationTest method testTestTupleClassAttrSetFromConfig.
@Test
public void testTestTupleClassAttrSetFromConfig() {
Configuration conf = new Configuration(false);
conf.set(StreamingApplication.APEX_PREFIX + "operator.o2.port.schemaRequiredPort.attr.TUPLE_CLASS", "com.datatorrent.stram.plan.logical.LogicalPlanConfigurationTest$TestSchema");
StreamingApplication streamingApplication = new StreamingApplication() {
@Override
public void populateDAG(DAG dag, Configuration conf) {
TestGeneratorInputOperator o1 = dag.addOperator("o1", new TestGeneratorInputOperator());
SchemaTestOperator o2 = dag.addOperator("o2", new SchemaTestOperator());
dag.addStream("stream", o1.outport, o2.schemaRequiredPort);
}
};
LogicalPlan dag = new LogicalPlan();
LogicalPlanConfiguration lpc = new LogicalPlanConfiguration(conf);
lpc.prepareDAG(dag, streamingApplication, "app");
dag.validate();
}
Aggregations