Search in sources :

Example 1 with JdbcPOJOPollInputOperator

use of org.apache.apex.malhar.lib.db.jdbc.JdbcPOJOPollInputOperator in project apex-malhar by apache.

the class JdbcPollerApplication method populateDAG.

@Override
public void populateDAG(DAG dag, Configuration conf) {
    JdbcPOJOPollInputOperator poller = dag.addOperator("JdbcPoller", new JdbcPOJOPollInputOperator());
    JdbcStore store = new JdbcStore();
    poller.setStore(store);
    poller.setFieldInfos(addFieldInfos());
    FileLineOutputOperator writer = dag.addOperator("Writer", new FileLineOutputOperator());
    dag.setInputPortAttribute(writer.input, PortContext.PARTITION_PARALLEL, true);
    writer.setRotationWindows(60);
    dag.addStream("dbrecords", poller.outputPort, writer.input);
}
Also used : JdbcPOJOPollInputOperator(org.apache.apex.malhar.lib.db.jdbc.JdbcPOJOPollInputOperator) JdbcStore(org.apache.apex.malhar.lib.db.jdbc.JdbcStore)

Aggregations

JdbcPOJOPollInputOperator (org.apache.apex.malhar.lib.db.jdbc.JdbcPOJOPollInputOperator)1 JdbcStore (org.apache.apex.malhar.lib.db.jdbc.JdbcStore)1