use of org.apache.apex.malhar.lib.fs.FSRecordReaderModule in project apex-malhar by apache.
the class Application method populateDAG.
public void populateDAG(DAG dag, Configuration conf) {
FSRecordReaderModule recordReader = dag.addModule("lineInput", FSRecordReaderModule.class);
S3BytesOutputModule s3StringOutputModule = dag.addModule("s3TupleOutput", S3BytesOutputModule.class);
dag.addStream("data", recordReader.records, s3StringOutputModule.input);
}
use of org.apache.apex.malhar.lib.fs.FSRecordReaderModule in project apex-malhar by apache.
the class Application method populateDAG.
@Override
public void populateDAG(DAG dag, Configuration conf) {
FSRecordReaderModule recordReader = dag.addModule("recordReader", FSRecordReaderModule.class);
CsvParser csvParser = dag.addOperator("csvParser", CsvParser.class);
CsvFormatter formatter = dag.addOperator("formatter", new CsvFormatter());
StringFileOutputOperator fileOutput = dag.addOperator("fileOutput", new StringFileOutputOperator());
dag.addStream("record", recordReader.records, csvParser.in);
dag.addStream("pojo", csvParser.out, formatter.in);
dag.addStream("string", formatter.out, fileOutput.input);
}
use of org.apache.apex.malhar.lib.fs.FSRecordReaderModule in project apex-malhar by apache.
the class Application method populateDAG.
@Override
public void populateDAG(DAG dag, Configuration conf) {
FSRecordReaderModule recordReader = dag.addModule("recordReader", FSRecordReaderModule.class);
CsvParser csvParser = dag.addOperator("csvParser", CsvParser.class);
FilterOperator filterOperator = dag.addOperator("filterOperator", new FilterOperator());
CsvFormatter selectedFormatter = dag.addOperator("selectedFormatter", new CsvFormatter());
CsvFormatter rejectedFormatter = dag.addOperator("rejectedFormatter", new CsvFormatter());
StringFileOutputOperator selectedOutput = dag.addOperator("selectedOutput", new StringFileOutputOperator());
StringFileOutputOperator rejectedOutput = dag.addOperator("rejectedOutput", new StringFileOutputOperator());
dag.addStream("record", recordReader.records, csvParser.in);
dag.addStream("pojo", csvParser.out, filterOperator.input);
dag.addStream("pojoSelected", filterOperator.truePort, selectedFormatter.in);
dag.addStream("pojoRejected", filterOperator.falsePort, rejectedFormatter.in);
dag.addStream("csvSelected", selectedFormatter.out, selectedOutput.input);
dag.addStream("csvRejected", rejectedFormatter.out, rejectedOutput.input);
}
Aggregations