Created
August 22, 2018 15:14
-
-
Save mattyb149/5b1ada5ebb09f50d702df4eff67f7a24 to your computer and use it in GitHub Desktop.
A NiFi template with a ScriptedLookupService that retrieves a sequence number from an external database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<template encoding-version="1.2"> | |
<description>This template gives an example of using a ScriptedLookupService to provide sequence numbers from a database.</description> | |
<groupId>5d7e55f8-0165-1000-1170-d42741815ddb</groupId> | |
<name>SequenceLookupExample</name> | |
<snippet> | |
<connections> | |
<id>0cf6aae2-8e5a-361f-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold> | |
<backPressureObjectThreshold>10000</backPressureObjectThreshold> | |
<destination> | |
<groupId>cedd92a0-903e-3f68-0000-000000000000</groupId> | |
<id>18d932d9-9435-3d73-0000-000000000000</id> | |
<type>PROCESSOR</type> | |
</destination> | |
<flowFileExpiration>0 sec</flowFileExpiration> | |
<labelIndex>1</labelIndex> | |
<name></name> | |
<selectedRelationships>success</selectedRelationships> | |
<source> | |
<groupId>cedd92a0-903e-3f68-0000-000000000000</groupId> | |
<id>226a0b7a-4223-3391-0000-000000000000</id> | |
<type>PROCESSOR</type> | |
</source> | |
<zIndex>0</zIndex> | |
</connections> | |
<connections> | |
<id>2323e874-4974-31d6-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold> | |
<backPressureObjectThreshold>10000</backPressureObjectThreshold> | |
<destination> | |
<groupId>cedd92a0-903e-3f68-0000-000000000000</groupId> | |
<id>d9c33af1-d7f3-34f3-0000-000000000000</id> | |
<type>PROCESSOR</type> | |
</destination> | |
<flowFileExpiration>0 sec</flowFileExpiration> | |
<labelIndex>1</labelIndex> | |
<name></name> | |
<selectedRelationships>success</selectedRelationships> | |
<source> | |
<groupId>cedd92a0-903e-3f68-0000-000000000000</groupId> | |
<id>18d932d9-9435-3d73-0000-000000000000</id> | |
<type>PROCESSOR</type> | |
</source> | |
<zIndex>0</zIndex> | |
</connections> | |
<controllerServices> | |
<id>32afb585-f4c2-39fe-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<bundle> | |
<artifact>nifi-scripting-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<comments></comments> | |
<descriptors> | |
<entry> | |
<key>Script Engine</key> | |
<value> | |
<name>Script Engine</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Script File</key> | |
<value> | |
<name>Script File</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Script Body</key> | |
<value> | |
<name>Script Body</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Module Directory</key> | |
<value> | |
<name>Module Directory</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Database Connection Pooling Service</key> | |
<value> | |
<identifiesControllerService>org.apache.nifi.dbcp.DBCPService</identifiesControllerService> | |
<name>Database Connection Pooling Service</name> | |
</value> | |
</entry> | |
</descriptors> | |
<name>ScriptedLookupService</name> | |
<persistsState>false</persistsState> | |
<properties> | |
<entry> | |
<key>Script Engine</key> | |
<value>Groovy</value> | |
</entry> | |
<entry> | |
<key>Script File</key> | |
</entry> | |
<entry> | |
<key>Script Body</key> | |
<value>import org.apache.nifi.controller.ControllerServiceInitializationContext | |
import org.apache.nifi.reporting.InitializationException | |
import org.apache.nifi.dbcp.DBCPService | |
import java.sql.* | |
class SequenceLookupService implements LookupService<String> { | |
final String ID = UUID.randomUUID().toString() | |
public static final PropertyDescriptor DBCP_SERVICE = new PropertyDescriptor.Builder() | |
.name("Database Connection Pooling Service") | |
.description("The Controller Service that is used to obtain connection to database") | |
.required(true) | |
.identifiesControllerService(DBCPService) | |
.build() | |
Connection conn = null | |
Statement stmt = null | |
ComponentLog log = null | |
@Override | |
Optional<String> lookup(Map<String, String> coordinates) { | |
final String key = coordinates.keySet().first() | |
ResultSet rs = stmt?.executeQuery("select nextval('${key}')".toString()) | |
return rs.next() ? Optional.ofNullable(rs.getLong(1)) : null | |
} | |
Set<String> getRequiredKeys() { | |
return java.util.Collections.emptySet(); | |
} | |
@Override | |
Class<?> getValueType() { | |
return String | |
} | |
@Override | |
void initialize(ControllerServiceInitializationContext context) throws InitializationException { | |
} | |
@Override | |
Collection<ValidationResult> validate(ValidationContext context) { | |
null | |
} | |
@Override | |
PropertyDescriptor getPropertyDescriptor(String name) { | |
name.equals(DBCP_SERVICE.name) ? DBCP_SERVICE : null | |
} | |
@Override | |
void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) { | |
} | |
@Override | |
List<PropertyDescriptor> getPropertyDescriptors() { | |
[DBCP_SERVICE] as List; | |
} | |
@Override | |
String getIdentifier() { | |
ID | |
} | |
def onEnabled(context) { | |
def db = context.getProperty(DBCP_SERVICE).asControllerService(DBCPService) | |
conn = db.connection | |
stmt = conn.createStatement() | |
} | |
def onDisabled() { | |
conn?.close() | |
} | |
def setLogger(logger) { | |
log = logger | |
} | |
} | |
lookupService = new SequenceLookupService()</value> | |
</entry> | |
<entry> | |
<key>Module Directory</key> | |
</entry> | |
<entry> | |
<key>Database Connection Pooling Service</key> | |
<value>bc8e3471-418f-38ff-0000-000000000000</value> | |
</entry> | |
</properties> | |
<state>ENABLED</state> | |
<type>org.apache.nifi.lookup.script.ScriptedLookupService</type> | |
</controllerServices> | |
<controllerServices> | |
<id>508cb3a3-b4db-3605-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<bundle> | |
<artifact>nifi-record-serialization-services-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<comments></comments> | |
<descriptors> | |
<entry> | |
<key>schema-access-strategy</key> | |
<value> | |
<name>schema-access-strategy</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-registry</key> | |
<value> | |
<identifiesControllerService>org.apache.nifi.schemaregistry.services.SchemaRegistry</identifiesControllerService> | |
<name>schema-registry</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-name</key> | |
<value> | |
<name>schema-name</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-version</key> | |
<value> | |
<name>schema-version</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-branch</key> | |
<value> | |
<name>schema-branch</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-text</key> | |
<value> | |
<name>schema-text</name> | |
</value> | |
</entry> | |
<entry> | |
<key>csv-reader-csv-parser</key> | |
<value> | |
<name>csv-reader-csv-parser</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Date Format</key> | |
<value> | |
<name>Date Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Time Format</key> | |
<value> | |
<name>Time Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Timestamp Format</key> | |
<value> | |
<name>Timestamp Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>CSV Format</key> | |
<value> | |
<name>CSV Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Value Separator</key> | |
<value> | |
<name>Value Separator</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Skip Header Line</key> | |
<value> | |
<name>Skip Header Line</name> | |
</value> | |
</entry> | |
<entry> | |
<key>ignore-csv-header</key> | |
<value> | |
<name>ignore-csv-header</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Quote Character</key> | |
<value> | |
<name>Quote Character</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Escape Character</key> | |
<value> | |
<name>Escape Character</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Comment Marker</key> | |
<value> | |
<name>Comment Marker</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Null String</key> | |
<value> | |
<name>Null String</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Trim Fields</key> | |
<value> | |
<name>Trim Fields</name> | |
</value> | |
</entry> | |
<entry> | |
<key>csvutils-character-set</key> | |
<value> | |
<name>csvutils-character-set</name> | |
</value> | |
</entry> | |
</descriptors> | |
<name>CSVReader</name> | |
<persistsState>false</persistsState> | |
<properties> | |
<entry> | |
<key>schema-access-strategy</key> | |
<value>schema-text-property</value> | |
</entry> | |
<entry> | |
<key>schema-registry</key> | |
</entry> | |
<entry> | |
<key>schema-name</key> | |
<value>${schema.name}</value> | |
</entry> | |
<entry> | |
<key>schema-version</key> | |
</entry> | |
<entry> | |
<key>schema-branch</key> | |
</entry> | |
<entry> | |
<key>schema-text</key> | |
<value>{ "type" : "record", "name" : "MyClass", "namespace" : "com.test.avro", "fields" : [ | |
{ "name" : "studentName", "type" : "string" }, | |
{ "name" : "Age", "type" : "string" }, | |
{ "name" : "address_city", "type" : "string" }, | |
{ "name" : "address1", "type" : "string" }, | |
{ "name" : "zipcode", "type" : "string" }, | |
{ "name" : "id", "type": ["null", "string"]} | |
]}</value> | |
</entry> | |
<entry> | |
<key>csv-reader-csv-parser</key> | |
<value>jackson-csv</value> | |
</entry> | |
<entry> | |
<key>Date Format</key> | |
</entry> | |
<entry> | |
<key>Time Format</key> | |
</entry> | |
<entry> | |
<key>Timestamp Format</key> | |
</entry> | |
<entry> | |
<key>CSV Format</key> | |
<value>custom</value> | |
</entry> | |
<entry> | |
<key>Value Separator</key> | |
<value>,</value> | |
</entry> | |
<entry> | |
<key>Skip Header Line</key> | |
<value>false</value> | |
</entry> | |
<entry> | |
<key>ignore-csv-header</key> | |
<value>false</value> | |
</entry> | |
<entry> | |
<key>Quote Character</key> | |
<value>"</value> | |
</entry> | |
<entry> | |
<key>Escape Character</key> | |
<value>\</value> | |
</entry> | |
<entry> | |
<key>Comment Marker</key> | |
</entry> | |
<entry> | |
<key>Null String</key> | |
</entry> | |
<entry> | |
<key>Trim Fields</key> | |
<value>true</value> | |
</entry> | |
<entry> | |
<key>csvutils-character-set</key> | |
<value>UTF-8</value> | |
</entry> | |
</properties> | |
<state>ENABLED</state> | |
<type>org.apache.nifi.csv.CSVReader</type> | |
</controllerServices> | |
<controllerServices> | |
<id>9829c5cc-dd04-3c8c-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<bundle> | |
<artifact>nifi-record-serialization-services-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<comments></comments> | |
<descriptors> | |
<entry> | |
<key>Schema Write Strategy</key> | |
<value> | |
<name>Schema Write Strategy</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-access-strategy</key> | |
<value> | |
<name>schema-access-strategy</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-registry</key> | |
<value> | |
<identifiesControllerService>org.apache.nifi.schemaregistry.services.SchemaRegistry</identifiesControllerService> | |
<name>schema-registry</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-name</key> | |
<value> | |
<name>schema-name</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-version</key> | |
<value> | |
<name>schema-version</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-branch</key> | |
<value> | |
<name>schema-branch</name> | |
</value> | |
</entry> | |
<entry> | |
<key>schema-text</key> | |
<value> | |
<name>schema-text</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Date Format</key> | |
<value> | |
<name>Date Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Time Format</key> | |
<value> | |
<name>Time Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Timestamp Format</key> | |
<value> | |
<name>Timestamp Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Pretty Print JSON</key> | |
<value> | |
<name>Pretty Print JSON</name> | |
</value> | |
</entry> | |
<entry> | |
<key>suppress-nulls</key> | |
<value> | |
<name>suppress-nulls</name> | |
</value> | |
</entry> | |
<entry> | |
<key>output-grouping</key> | |
<value> | |
<name>output-grouping</name> | |
</value> | |
</entry> | |
</descriptors> | |
<name>JsonRecordSetWriter</name> | |
<persistsState>false</persistsState> | |
<properties> | |
<entry> | |
<key>Schema Write Strategy</key> | |
<value>full-schema-attribute</value> | |
</entry> | |
<entry> | |
<key>schema-access-strategy</key> | |
<value>inherit-record-schema</value> | |
</entry> | |
<entry> | |
<key>schema-registry</key> | |
</entry> | |
<entry> | |
<key>schema-name</key> | |
<value>${schema.name}</value> | |
</entry> | |
<entry> | |
<key>schema-version</key> | |
</entry> | |
<entry> | |
<key>schema-branch</key> | |
</entry> | |
<entry> | |
<key>schema-text</key> | |
<value>{ "type" : "record", "name" : "MyClass", "namespace" : "com.test.avro", "fields" : [ | |
{ "name" : "studentName", "type" : "string" }, | |
{ "name" : "Age", "type" : "string" }, | |
{ "name" : "address_city", "type" : "string" }, | |
{ "name" : "address1", "type" : "string" }, | |
{ "name" : "zipcode", "type" : "string" }, | |
{ "name" : "id", "type": ["null", "string"]} | |
]}</value> | |
</entry> | |
<entry> | |
<key>Date Format</key> | |
</entry> | |
<entry> | |
<key>Time Format</key> | |
</entry> | |
<entry> | |
<key>Timestamp Format</key> | |
</entry> | |
<entry> | |
<key>Pretty Print JSON</key> | |
<value>false</value> | |
</entry> | |
<entry> | |
<key>suppress-nulls</key> | |
<value>never-suppress</value> | |
</entry> | |
<entry> | |
<key>output-grouping</key> | |
<value>output-array</value> | |
</entry> | |
</properties> | |
<state>ENABLED</state> | |
<type>org.apache.nifi.json.JsonRecordSetWriter</type> | |
</controllerServices> | |
<controllerServices> | |
<id>bc8e3471-418f-38ff-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<bundle> | |
<artifact>nifi-dbcp-service-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<comments></comments> | |
<descriptors> | |
<entry> | |
<key>Database Connection URL</key> | |
<value> | |
<name>Database Connection URL</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Database Driver Class Name</key> | |
<value> | |
<name>Database Driver Class Name</name> | |
</value> | |
</entry> | |
<entry> | |
<key>database-driver-locations</key> | |
<value> | |
<name>database-driver-locations</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Database User</key> | |
<value> | |
<name>Database User</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Password</key> | |
<value> | |
<name>Password</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Max Wait Time</key> | |
<value> | |
<name>Max Wait Time</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Max Total Connections</key> | |
<value> | |
<name>Max Total Connections</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Validation-query</key> | |
<value> | |
<name>Validation-query</name> | |
</value> | |
</entry> | |
</descriptors> | |
<name>PostgresConnectionPool</name> | |
<persistsState>false</persistsState> | |
<properties> | |
<entry> | |
<key>Database Connection URL</key> | |
<value>jdbc:postgresql://localhost:5432/postgres</value> | |
</entry> | |
<entry> | |
<key>Database Driver Class Name</key> | |
<value>org.postgresql.Driver</value> | |
</entry> | |
<entry> | |
<key>database-driver-locations</key> | |
<value>/Users/mburgess/jdbc_drivers/postgresql-9.3-1102-jdbc4.jar</value> | |
</entry> | |
<entry> | |
<key>Database User</key> | |
<value>postgres</value> | |
</entry> | |
<entry> | |
<key>Password</key> | |
</entry> | |
<entry> | |
<key>Max Wait Time</key> | |
<value>500 millis</value> | |
</entry> | |
<entry> | |
<key>Max Total Connections</key> | |
<value>8</value> | |
</entry> | |
<entry> | |
<key>Validation-query</key> | |
</entry> | |
</properties> | |
<state>ENABLED</state> | |
<type>org.apache.nifi.dbcp.DBCPConnectionPool</type> | |
</controllerServices> | |
<processors> | |
<id>18d932d9-9435-3d73-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<position> | |
<x>4.515228140595582</x> | |
<y>212.55852447762416</y> | |
</position> | |
<bundle> | |
<artifact>nifi-standard-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<config> | |
<bulletinLevel>WARN</bulletinLevel> | |
<comments></comments> | |
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> | |
<descriptors> | |
<entry> | |
<key>record-reader</key> | |
<value> | |
<identifiesControllerService>org.apache.nifi.serialization.RecordReaderFactory</identifiesControllerService> | |
<name>record-reader</name> | |
</value> | |
</entry> | |
<entry> | |
<key>record-writer</key> | |
<value> | |
<identifiesControllerService>org.apache.nifi.serialization.RecordSetWriterFactory</identifiesControllerService> | |
<name>record-writer</name> | |
</value> | |
</entry> | |
<entry> | |
<key>lookup-service</key> | |
<value> | |
<identifiesControllerService>org.apache.nifi.lookup.LookupService</identifiesControllerService> | |
<name>lookup-service</name> | |
</value> | |
</entry> | |
<entry> | |
<key>result-record-path</key> | |
<value> | |
<name>result-record-path</name> | |
</value> | |
</entry> | |
<entry> | |
<key>routing-strategy</key> | |
<value> | |
<name>routing-strategy</name> | |
</value> | |
</entry> | |
<entry> | |
<key>result-contents</key> | |
<value> | |
<name>result-contents</name> | |
</value> | |
</entry> | |
<entry> | |
<key>id_seq</key> | |
<value> | |
<name>id_seq</name> | |
</value> | |
</entry> | |
</descriptors> | |
<executionNode>ALL</executionNode> | |
<lossTolerant>false</lossTolerant> | |
<penaltyDuration>30 sec</penaltyDuration> | |
<properties> | |
<entry> | |
<key>record-reader</key> | |
<value>508cb3a3-b4db-3605-0000-000000000000</value> | |
</entry> | |
<entry> | |
<key>record-writer</key> | |
<value>9829c5cc-dd04-3c8c-0000-000000000000</value> | |
</entry> | |
<entry> | |
<key>lookup-service</key> | |
<value>32afb585-f4c2-39fe-0000-000000000000</value> | |
</entry> | |
<entry> | |
<key>result-record-path</key> | |
<value>/id</value> | |
</entry> | |
<entry> | |
<key>routing-strategy</key> | |
<value>route-to-success</value> | |
</entry> | |
<entry> | |
<key>result-contents</key> | |
<value>record-fields</value> | |
</entry> | |
<entry> | |
<key>id_seq</key> | |
<value>/Age</value> | |
</entry> | |
</properties> | |
<runDurationMillis>0</runDurationMillis> | |
<schedulingPeriod>0 sec</schedulingPeriod> | |
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> | |
<yieldDuration>1 sec</yieldDuration> | |
</config> | |
<executionNodeRestricted>false</executionNodeRestricted> | |
<name>LookupRecord</name> | |
<relationships> | |
<autoTerminate>true</autoTerminate> | |
<name>failure</name> | |
</relationships> | |
<relationships> | |
<autoTerminate>false</autoTerminate> | |
<name>success</name> | |
</relationships> | |
<state>STOPPED</state> | |
<style/> | |
<type>org.apache.nifi.processors.standard.LookupRecord</type> | |
</processors> | |
<processors> | |
<id>226a0b7a-4223-3391-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<position> | |
<x>0.0</x> | |
<y>0.0</y> | |
</position> | |
<bundle> | |
<artifact>nifi-standard-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<config> | |
<bulletinLevel>WARN</bulletinLevel> | |
<comments></comments> | |
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> | |
<descriptors> | |
<entry> | |
<key>File Size</key> | |
<value> | |
<name>File Size</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Batch Size</key> | |
<value> | |
<name>Batch Size</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Data Format</key> | |
<value> | |
<name>Data Format</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Unique FlowFiles</key> | |
<value> | |
<name>Unique FlowFiles</name> | |
</value> | |
</entry> | |
<entry> | |
<key>generate-ff-custom-text</key> | |
<value> | |
<name>generate-ff-custom-text</name> | |
</value> | |
</entry> | |
<entry> | |
<key>character-set</key> | |
<value> | |
<name>character-set</name> | |
</value> | |
</entry> | |
</descriptors> | |
<executionNode>ALL</executionNode> | |
<lossTolerant>false</lossTolerant> | |
<penaltyDuration>30 sec</penaltyDuration> | |
<properties> | |
<entry> | |
<key>File Size</key> | |
<value>0B</value> | |
</entry> | |
<entry> | |
<key>Batch Size</key> | |
<value>1</value> | |
</entry> | |
<entry> | |
<key>Data Format</key> | |
<value>Text</value> | |
</entry> | |
<entry> | |
<key>Unique FlowFiles</key> | |
<value>false</value> | |
</entry> | |
<entry> | |
<key>generate-ff-custom-text</key> | |
<value>"Foo","12","newyork","North avenue","123213" | |
"Foo1","12","newyork","North avenue","123213" | |
"Foo2","12","newyork","North avenue","123213"</value> | |
</entry> | |
<entry> | |
<key>character-set</key> | |
<value>UTF-8</value> | |
</entry> | |
</properties> | |
<runDurationMillis>0</runDurationMillis> | |
<schedulingPeriod>60 sec</schedulingPeriod> | |
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> | |
<yieldDuration>1 sec</yieldDuration> | |
</config> | |
<executionNodeRestricted>false</executionNodeRestricted> | |
<name>GenerateFlowFile</name> | |
<relationships> | |
<autoTerminate>false</autoTerminate> | |
<name>success</name> | |
</relationships> | |
<state>STOPPED</state> | |
<style/> | |
<type>org.apache.nifi.processors.standard.GenerateFlowFile</type> | |
</processors> | |
<processors> | |
<id>d9c33af1-d7f3-34f3-0000-000000000000</id> | |
<parentGroupId>cedd92a0-903e-3f68-0000-000000000000</parentGroupId> | |
<position> | |
<x>13.0</x> | |
<y>452.0</y> | |
</position> | |
<bundle> | |
<artifact>nifi-standard-nar</artifact> | |
<group>org.apache.nifi</group> | |
<version>1.8.0-SNAPSHOT</version> | |
</bundle> | |
<config> | |
<bulletinLevel>WARN</bulletinLevel> | |
<comments></comments> | |
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount> | |
<descriptors> | |
<entry> | |
<key>Log Level</key> | |
<value> | |
<name>Log Level</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Log Payload</key> | |
<value> | |
<name>Log Payload</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Attributes to Log</key> | |
<value> | |
<name>Attributes to Log</name> | |
</value> | |
</entry> | |
<entry> | |
<key>attributes-to-log-regex</key> | |
<value> | |
<name>attributes-to-log-regex</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Attributes to Ignore</key> | |
<value> | |
<name>Attributes to Ignore</name> | |
</value> | |
</entry> | |
<entry> | |
<key>attributes-to-ignore-regex</key> | |
<value> | |
<name>attributes-to-ignore-regex</name> | |
</value> | |
</entry> | |
<entry> | |
<key>Log prefix</key> | |
<value> | |
<name>Log prefix</name> | |
</value> | |
</entry> | |
<entry> | |
<key>character-set</key> | |
<value> | |
<name>character-set</name> | |
</value> | |
</entry> | |
</descriptors> | |
<executionNode>ALL</executionNode> | |
<lossTolerant>false</lossTolerant> | |
<penaltyDuration>30 sec</penaltyDuration> | |
<properties> | |
<entry> | |
<key>Log Level</key> | |
<value>info</value> | |
</entry> | |
<entry> | |
<key>Log Payload</key> | |
<value>false</value> | |
</entry> | |
<entry> | |
<key>Attributes to Log</key> | |
</entry> | |
<entry> | |
<key>attributes-to-log-regex</key> | |
<value>.*</value> | |
</entry> | |
<entry> | |
<key>Attributes to Ignore</key> | |
</entry> | |
<entry> | |
<key>attributes-to-ignore-regex</key> | |
</entry> | |
<entry> | |
<key>Log prefix</key> | |
</entry> | |
<entry> | |
<key>character-set</key> | |
<value>UTF-8</value> | |
</entry> | |
</properties> | |
<runDurationMillis>0</runDurationMillis> | |
<schedulingPeriod>0 sec</schedulingPeriod> | |
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy> | |
<yieldDuration>1 sec</yieldDuration> | |
</config> | |
<executionNodeRestricted>false</executionNodeRestricted> | |
<name>LogAttribute</name> | |
<relationships> | |
<autoTerminate>false</autoTerminate> | |
<name>success</name> | |
</relationships> | |
<state>STOPPED</state> | |
<style/> | |
<type>org.apache.nifi.processors.standard.LogAttribute</type> | |
</processors> | |
</snippet> | |
<timestamp>08/22/2018 10:56:27 EDT</timestamp> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment