Search in sources :

Example 1 with KafkaSinglePortStringInputOperator

use of org.apache.apex.examples.exactlyonce.ExactlyOnceJdbcOutputApp.KafkaSinglePortStringInputOperator in project apex-malhar by apache.

the class ExactlyOnceFileOutputApp method populateDAG.

@Override
public void populateDAG(DAG dag, Configuration configuration) {
    KafkaSinglePortStringInputOperator kafkaInput = dag.addOperator("kafkaInput", new KafkaSinglePortStringInputOperator());
    kafkaInput.setWindowDataManager(new FSWindowDataManager());
    ExactlyOnceJdbcOutputApp.UniqueCounterFlat count = dag.addOperator("count", new ExactlyOnceJdbcOutputApp.UniqueCounterFlat());
    FileWriter fileWriter = dag.addOperator("fileWriter", new FileWriter());
    ConsoleOutputOperator cons = dag.addOperator("console", new ConsoleOutputOperator());
    dag.addStream("words", kafkaInput.outputPort, count.data);
    dag.addStream("counts", count.counts, fileWriter.input, cons.input);
}
Also used : ConsoleOutputOperator(org.apache.apex.malhar.lib.io.ConsoleOutputOperator) KafkaSinglePortStringInputOperator(org.apache.apex.examples.exactlyonce.ExactlyOnceJdbcOutputApp.KafkaSinglePortStringInputOperator) FSWindowDataManager(org.apache.apex.malhar.lib.wal.FSWindowDataManager)

Aggregations

KafkaSinglePortStringInputOperator (org.apache.apex.examples.exactlyonce.ExactlyOnceJdbcOutputApp.KafkaSinglePortStringInputOperator)1 ConsoleOutputOperator (org.apache.apex.malhar.lib.io.ConsoleOutputOperator)1 FSWindowDataManager (org.apache.apex.malhar.lib.wal.FSWindowDataManager)1