Skip to content

Instantly share code, notes, and snippets.

@bbende
Created April 2, 2018 20:35
Show Gist options
  • Save bbende/edc2e7d61db83b29533ac3fc520de30f to your computer and use it in GitHub Desktop.
Save bbende/edc2e7d61db83b29533ac3fc520de30f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>87bb4080-0162-1000-3be7-579b457627c6</groupId>
<name>PutSolrRecordTesting</name>
<snippet>
<processGroups>
<id>17ff7e8c-35c9-3607-0000-000000000000</id>
<parentGroupId>415ab1fc-373d-3291-0000-000000000000</parentGroupId>
<position>
<x>0.0</x>
<y>0.0</y>
</position>
<comments></comments>
<contents>
<connections>
<id>b44f3ea1-b034-3342-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
<backPressureObjectThreshold>10000</backPressureObjectThreshold>
<destination>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>b3a744ce-5dcc-3e80-0000-000000000000</id>
<type>PROCESSOR</type>
</destination>
<flowFileExpiration>0 sec</flowFileExpiration>
<labelIndex>1</labelIndex>
<name></name>
<selectedRelationships>success</selectedRelationships>
<source>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>c833e742-3bca-3efc-0000-000000000000</id>
<type>PROCESSOR</type>
</source>
<zIndex>0</zIndex>
</connections>
<connections>
<id>cd56f7ba-9f52-3ef9-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
<backPressureObjectThreshold>10000</backPressureObjectThreshold>
<destination>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>b3a744ce-5dcc-3e80-0000-000000000000</id>
<type>PROCESSOR</type>
</destination>
<flowFileExpiration>0 sec</flowFileExpiration>
<labelIndex>1</labelIndex>
<name></name>
<selectedRelationships>success</selectedRelationships>
<source>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>c394e4be-55ef-3a4c-0000-000000000000</id>
<type>PROCESSOR</type>
</source>
<zIndex>0</zIndex>
</connections>
<connections>
<id>fb004e94-9d4c-3f44-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
<backPressureObjectThreshold>10000</backPressureObjectThreshold>
<destination>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>ab981526-da57-33d4-0000-000000000000</id>
<type>PROCESSOR</type>
</destination>
<flowFileExpiration>0 sec</flowFileExpiration>
<labelIndex>1</labelIndex>
<name></name>
<selectedRelationships>failure</selectedRelationships>
<source>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>b3a744ce-5dcc-3e80-0000-000000000000</id>
<type>PROCESSOR</type>
</source>
<zIndex>0</zIndex>
</connections>
<connections>
<id>5acf1814-7b8e-3762-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
<backPressureObjectThreshold>10000</backPressureObjectThreshold>
<bends>
<x>1360.0</x>
<y>494.0</y>
</bends>
<bends>
<x>1388.0</x>
<y>532.0</y>
</bends>
<destination>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>b3a744ce-5dcc-3e80-0000-000000000000</id>
<type>PROCESSOR</type>
</destination>
<flowFileExpiration>0 sec</flowFileExpiration>
<labelIndex>1</labelIndex>
<name></name>
<selectedRelationships>connection_failure</selectedRelationships>
<source>
<groupId>17ff7e8c-35c9-3607-0000-000000000000</groupId>
<id>b3a744ce-5dcc-3e80-0000-000000000000</id>
<type>PROCESSOR</type>
</source>
<zIndex>0</zIndex>
</connections>
<controllerServices>
<id>8a52c110-d513-3d32-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<bundle>
<artifact>nifi-registry-nar</artifact>
<group>org.apache.nifi</group>
<version>1.6.0-SNAPSHOT</version>
</bundle>
<comments></comments>
<descriptors>
<entry>
<key>avro-reg-validated-field-names</key>
<value>
<name>avro-reg-validated-field-names</name>
</value>
</entry>
<entry>
<key>array-nested</key>
<value>
<name>array-nested</name>
</value>
</entry>
<entry>
<key>single-nested</key>
<value>
<name>single-nested</name>
</value>
</entry>
</descriptors>
<name>AvroSchemaRegistry</name>
<persistsState>false</persistsState>
<properties>
<entry>
<key>avro-reg-validated-field-names</key>
<value>true</value>
</entry>
<entry>
<key>array-nested</key>
<value>{
"type": "record",
"name": "exams",
"fields" : [
{ "name": "first", "type": "string" },
{ "name": "last", "type": "string" },
{ "name": "grade", "type": "int" },
{
"name": "exams",
"type": {
"type" : "array",
"items" : {
"name" : "exam",
"type" : "record",
"fields" : [
{ "name": "subject", "type": "string" },
{ "name": "test", "type": "string" },
{ "name": "marks", "type": "int" }
]
}
}
}
]
}</value>
</entry>
<entry>
<key>single-nested</key>
<value>{
"type": "record",
"name": "exams",
"fields" : [
{ "name": "first", "type": "string" },
{ "name": "last", "type": "string" },
{ "name": "grade", "type": "int" },
{
"name": "exam",
"type": {
"name" : "exam",
"type" : "record",
"fields" : [
{ "name": "subject", "type": "string" },
{ "name": "test", "type": "string" },
{ "name": "marks", "type": "int" }
]
}
}
]
}</value>
</entry>
</properties>
<state>ENABLED</state>
<type>org.apache.nifi.schemaregistry.services.AvroSchemaRegistry</type>
</controllerServices>
<controllerServices>
<id>218c856b-dac8-3c51-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<bundle>
<artifact>nifi-record-serialization-services-nar</artifact>
<group>org.apache.nifi</group>
<version>1.6.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>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>
</descriptors>
<name>JsonTreeReader</name>
<persistsState>false</persistsState>
<properties>
<entry>
<key>schema-access-strategy</key>
<value>schema-name</value>
</entry>
<entry>
<key>schema-registry</key>
<value>8a52c110-d513-3d32-0000-000000000000</value>
</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>${avro.schema}</value>
</entry>
<entry>
<key>Date Format</key>
</entry>
<entry>
<key>Time Format</key>
</entry>
<entry>
<key>Timestamp Format</key>
</entry>
</properties>
<state>ENABLED</state>
<type>org.apache.nifi.json.JsonTreeReader</type>
</controllerServices>
<processors>
<id>ab981526-da57-33d4-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<position>
<x>910.0</x>
<y>660.0</y>
</position>
<bundle>
<artifact>nifi-standard-nar</artifact>
<group>org.apache.nifi</group>
<version>1.6.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>true</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>
<name>LogAttribute</name>
<relationships>
<autoTerminate>true</autoTerminate>
<name>success</name>
</relationships>
<state>STOPPED</state>
<style/>
<type>org.apache.nifi.processors.standard.LogAttribute</type>
</processors>
<processors>
<id>b3a744ce-5dcc-3e80-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<position>
<x>905.0</x>
<y>454.0</y>
</position>
<bundle>
<artifact>nifi-solr-nar</artifact>
<group>org.apache.nifi</group>
<version>1.6.0-SNAPSHOT</version>
</bundle>
<config>
<bulletinLevel>WARN</bulletinLevel>
<comments></comments>
<concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
<descriptors>
<entry>
<key>Solr Type</key>
<value>
<name>Solr Type</name>
</value>
</entry>
<entry>
<key>Solr Location</key>
<value>
<name>Solr Location</name>
</value>
</entry>
<entry>
<key>Collection</key>
<value>
<name>Collection</name>
</value>
</entry>
<entry>
<key>Solr Update Path</key>
<value>
<name>Solr Update Path</name>
</value>
</entry>
<entry>
<key>put-solr-record-record-reader</key>
<value>
<identifiesControllerService>org.apache.nifi.serialization.RecordReaderFactory</identifiesControllerService>
<name>put-solr-record-record-reader</name>
</value>
</entry>
<entry>
<key>Fields To Index</key>
<value>
<name>Fields To Index</name>
</value>
</entry>
<entry>
<key>Batch Size</key>
<value>
<name>Batch Size</name>
</value>
</entry>
<entry>
<key>Commit Within</key>
<value>
<name>Commit Within</name>
</value>
</entry>
<entry>
<key>JAAS Client App Name</key>
<value>
<name>JAAS Client App Name</name>
</value>
</entry>
<entry>
<key>Username</key>
<value>
<name>Username</name>
</value>
</entry>
<entry>
<key>Password</key>
<value>
<name>Password</name>
</value>
</entry>
<entry>
<key>SSL Context Service</key>
<value>
<identifiesControllerService>org.apache.nifi.ssl.SSLContextService</identifiesControllerService>
<name>SSL Context Service</name>
</value>
</entry>
<entry>
<key>Solr Socket Timeout</key>
<value>
<name>Solr Socket Timeout</name>
</value>
</entry>
<entry>
<key>Solr Connection Timeout</key>
<value>
<name>Solr Connection Timeout</name>
</value>
</entry>
<entry>
<key>Solr Maximum Connections</key>
<value>
<name>Solr Maximum Connections</name>
</value>
</entry>
<entry>
<key>Solr Maximum Connections Per Host</key>
<value>
<name>Solr Maximum Connections Per Host</name>
</value>
</entry>
<entry>
<key>ZooKeeper Client Timeout</key>
<value>
<name>ZooKeeper Client Timeout</name>
</value>
</entry>
<entry>
<key>ZooKeeper Connection Timeout</key>
<value>
<name>ZooKeeper Connection Timeout</name>
</value>
</entry>
</descriptors>
<executionNode>ALL</executionNode>
<lossTolerant>false</lossTolerant>
<penaltyDuration>30 sec</penaltyDuration>
<properties>
<entry>
<key>Solr Type</key>
<value>Cloud</value>
</entry>
<entry>
<key>Solr Location</key>
<value>localhost:9983</value>
</entry>
<entry>
<key>Collection</key>
<value>data-dev</value>
</entry>
<entry>
<key>Solr Update Path</key>
<value>/update</value>
</entry>
<entry>
<key>put-solr-record-record-reader</key>
<value>218c856b-dac8-3c51-0000-000000000000</value>
</entry>
<entry>
<key>Fields To Index</key>
</entry>
<entry>
<key>Batch Size</key>
<value>500</value>
</entry>
<entry>
<key>Commit Within</key>
<value>5000</value>
</entry>
<entry>
<key>JAAS Client App Name</key>
</entry>
<entry>
<key>Username</key>
</entry>
<entry>
<key>Password</key>
</entry>
<entry>
<key>SSL Context Service</key>
</entry>
<entry>
<key>Solr Socket Timeout</key>
<value>10 seconds</value>
</entry>
<entry>
<key>Solr Connection Timeout</key>
<value>10 seconds</value>
</entry>
<entry>
<key>Solr Maximum Connections</key>
<value>10</value>
</entry>
<entry>
<key>Solr Maximum Connections Per Host</key>
<value>5</value>
</entry>
<entry>
<key>ZooKeeper Client Timeout</key>
<value>10 seconds</value>
</entry>
<entry>
<key>ZooKeeper Connection Timeout</key>
<value>10 seconds</value>
</entry>
</properties>
<runDurationMillis>0</runDurationMillis>
<schedulingPeriod>0 sec</schedulingPeriod>
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
<yieldDuration>1 sec</yieldDuration>
</config>
<name>PutSolrRecord</name>
<relationships>
<autoTerminate>false</autoTerminate>
<name>connection_failure</name>
</relationships>
<relationships>
<autoTerminate>false</autoTerminate>
<name>failure</name>
</relationships>
<relationships>
<autoTerminate>true</autoTerminate>
<name>success</name>
</relationships>
<state>STOPPED</state>
<style/>
<type>org.apache.nifi.processors.solr.PutSolrRecord</type>
</processors>
<processors>
<id>c394e4be-55ef-3a4c-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<position>
<x>704.0</x>
<y>182.0</y>
</position>
<bundle>
<artifact>nifi-standard-nar</artifact>
<group>org.apache.nifi</group>
<version>1.6.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>
<entry>
<key>schema.name</key>
<value>
<name>schema.name</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>{
"first": "Abhi",
"last": "R",
"grade": 8,
"exams": [
{
"subject": "Maths",
"test" : "term1",
"marks" : 90
},
{
"subject": "Physics",
"test" : "term1",
"marks" : 95
}
]
}</value>
</entry>
<entry>
<key>character-set</key>
<value>UTF-8</value>
</entry>
<entry>
<key>schema.name</key>
<value>array-nested</value>
</entry>
</properties>
<runDurationMillis>0</runDurationMillis>
<schedulingPeriod>10 sec</schedulingPeriod>
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
<yieldDuration>1 sec</yieldDuration>
</config>
<name>Array of Exams</name>
<relationships>
<autoTerminate>false</autoTerminate>
<name>success</name>
</relationships>
<state>STOPPED</state>
<style/>
<type>org.apache.nifi.processors.standard.GenerateFlowFile</type>
</processors>
<processors>
<id>c833e742-3bca-3efc-0000-000000000000</id>
<parentGroupId>17ff7e8c-35c9-3607-0000-000000000000</parentGroupId>
<position>
<x>1135.0</x>
<y>179.0</y>
</position>
<bundle>
<artifact>nifi-standard-nar</artifact>
<group>org.apache.nifi</group>
<version>1.6.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>
<entry>
<key>schema.name</key>
<value>
<name>schema.name</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>{
"first": "Abhi",
"last": "R",
"grade": 8,
"exam": {
"subject": "Maths",
"test" : "term1",
"marks" : 90
}
}</value>
</entry>
<entry>
<key>character-set</key>
<value>UTF-8</value>
</entry>
<entry>
<key>schema.name</key>
<value>single-nested</value>
</entry>
</properties>
<runDurationMillis>0</runDurationMillis>
<schedulingPeriod>10 sec</schedulingPeriod>
<schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
<yieldDuration>1 sec</yieldDuration>
</config>
<name>Single Exam</name>
<relationships>
<autoTerminate>false</autoTerminate>
<name>success</name>
</relationships>
<state>STOPPED</state>
<style/>
<type>org.apache.nifi.processors.standard.GenerateFlowFile</type>
</processors>
</contents>
<name>PutSolrRecord Testing</name>
<variables>
<entry>
<key>solr.index.fields</key>
<value>first_name, last_name</value>
</entry>
<entry>
<key>solr.collection</key>
<value>data-dev</value>
</entry>
</variables>
</processGroups>
</snippet>
<timestamp>04/02/2018 16:33:44 EDT</timestamp>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment