Search in sources :

Example 1 with LineReader

use of org.apache.apex.malhar.sql.operators.LineReader in project apex-malhar by apache.

the class FileEndpoint method populateInputDAG.

@Override
public RelInfo populateInputDAG(DAG dag, JavaTypeFactory typeFactory) {
    LineReader fileInput = dag.addOperator(OperatorUtils.getUniqueOperatorName("FileInput"), LineReader.class);
    fileInput.setDirectory((String) operands.get(FILE_INPUT_DIRECTORY));
    RelInfo spec = messageFormat.populateInputDAG(dag, typeFactory);
    dag.addStream(OperatorUtils.getUniqueStreamName("File", "Parser"), fileInput.output, spec.getInputPorts().get(0));
    return new RelInfo("Input", Lists.<Operator.InputPort>newArrayList(), spec.getOperator(), spec.getOutPort(), messageFormat.getRowType(typeFactory));
}
Also used : Operator(com.datatorrent.api.Operator) GenericFileOutputOperator(org.apache.apex.malhar.lib.fs.GenericFileOutputOperator) LineReader(org.apache.apex.malhar.sql.operators.LineReader) RelInfo(org.apache.apex.malhar.sql.planner.RelInfo)

Aggregations

Operator (com.datatorrent.api.Operator)1 GenericFileOutputOperator (org.apache.apex.malhar.lib.fs.GenericFileOutputOperator)1 LineReader (org.apache.apex.malhar.sql.operators.LineReader)1 RelInfo (org.apache.apex.malhar.sql.planner.RelInfo)1