Search in sources :

Example 1 with NiFiSinglePortInputOperator

use of org.apache.apex.malhar.contrib.nifi.NiFiSinglePortInputOperator in project apex-malhar by apache.

the class TestNiFiInputApplication method populateDAG.

@Override
public void populateDAG(DAG dag, Configuration conf) {
    final SiteToSiteClientConfig clientConfig = new SiteToSiteClient.Builder().url("http://localhost:8080/nifi").portName("Apex").requestBatchCount(5).buildConfig();
    final SiteToSiteClient.Builder builder = new SiteToSiteClient.Builder().fromConfig(clientConfig);
    final WindowDataManager windowDataManager = new WindowDataManager.NoopWindowDataManager();
    NiFiSinglePortInputOperator nifi = dag.addOperator("nifi", new NiFiSinglePortInputOperator(builder, windowDataManager));
    ConsoleOutputOperator console = dag.addOperator("console", new ConsoleOutputOperator());
    dag.addStream("nifi_console", nifi.outputPort, console.input).setLocality(null);
}
Also used : SiteToSiteClient(org.apache.nifi.remote.client.SiteToSiteClient) ConsoleOutputOperator(org.apache.apex.malhar.lib.io.ConsoleOutputOperator) SiteToSiteClientConfig(org.apache.nifi.remote.client.SiteToSiteClientConfig) NiFiSinglePortInputOperator(org.apache.apex.malhar.contrib.nifi.NiFiSinglePortInputOperator) WindowDataManager(org.apache.apex.malhar.lib.wal.WindowDataManager)

Aggregations

NiFiSinglePortInputOperator (org.apache.apex.malhar.contrib.nifi.NiFiSinglePortInputOperator)1 ConsoleOutputOperator (org.apache.apex.malhar.lib.io.ConsoleOutputOperator)1 WindowDataManager (org.apache.apex.malhar.lib.wal.WindowDataManager)1 SiteToSiteClient (org.apache.nifi.remote.client.SiteToSiteClient)1 SiteToSiteClientConfig (org.apache.nifi.remote.client.SiteToSiteClientConfig)1