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);
}
Aggregations