Skip to content

Instantly share code, notes, and snippets.

View alopresto's full-sized avatar
🔏
Focusing on NiFi security...

Andy LoPresto alopresto

🔏
Focusing on NiFi security...
View GitHub Profile
@alopresto
alopresto / attribute_evaluator.xml
Last active February 17, 2018 04:52
This template generates a flowfile with multiple attributes and uses Expression Language to evaluate those attributes into additional attributes.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description>This template generates a flowfile with multiple attributes and uses Expression Language to evaluate those attributes into additional attributes. </description>
<groupId>a20d9905-0161-1000-8940-310c17982f38</groupId>
<name>Attribute Evaluator</name>
<snippet>
<connections>
<id>b8fdecf4-7bda-3fea-0000-000000000000</id>
<parentGroupId>7e36c284-2e4d-329b-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
@alopresto
alopresto / flow.xml
Created February 2, 2018 15:56
Simple flow to publish and consume JMS messages from an ActiveMQ queue.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flowController encoding-version="1.3">
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
<maxEventDrivenThreadCount>5</maxEventDrivenThreadCount>
<registries/>
<rootGroup>
<id>1f73b0f0-0161-1000-fe9c-2d7ad542217c</id>
<name>NiFi Flow</name>
<position x="0.0" y="0.0"/>
<comment/>
@alopresto
alopresto / flow.xml
Created January 4, 2018 16:26
Flow for testing CountText processor with local or remote input
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flowController encoding-version="1.2">
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
<maxEventDrivenThreadCount>5</maxEventDrivenThreadCount>
<rootGroup>
<id>c1cbc231-0160-1000-a257-527d2f64f75f</id>
<name>NiFi Flow</name>
<position x="0.0" y="0.0"/>
<comment/>
<processor>
@alopresto
alopresto / jackson_version_upgrade_test_template.xml
Created October 5, 2017 01:04
This Apache NiFi template is designed to test the Jackson version upgrades. Runs a self-contained web server to respond with static JSON content and then a separate flow consumes and manipulates the JSON response.
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description>This template is designed to test the Jackson version upgrades. Runs a self-contained web server to respond with static JSON content and then a separate flow consumes and manipulates the JSON response. </description>
<groupId>ea0e59a1-015e-1000-a9c0-19adc6e77a4c</groupId>
<name>Web Server and JSON Test</name>
<snippet>
<connections>
<id>89dc319b-d631-35e4-0000-000000000000</id>
<parentGroupId>f31765c3-5e97-3ff1-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
@alopresto
alopresto / date_manipulation_template.xml
Created September 30, 2017 01:49
An Apache NiFi template which generates a flowfile with the current date and a variable containing the "number of days to add", then adds those values and formats the resulting endDate value in YYYY-MM-dd format, then logs it.
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description>An Apache NiFi template which generates a flowfile with the current date and a variable containing the "number of days to add", then adds those values and formats the resulting endDate value in YYYY-MM-dd format, then logs it. </description>
<groupId>ca2c8550-015e-1000-5ffe-40ada3779a18</groupId>
<name>Date Manipulation Template</name>
<snippet>
<connections>
<id>13d16949-32e9-3ce7-0000-000000000000</id>
<parentGroupId>6c657f33-8c55-3f93-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>

Keybase proof

I hereby claim:

  • I am alopresto on github.
  • I am alopresto (https://keybase.io/alopresto) on keybase.
  • I have a public key ASCxwpmDhW4vR_IsPpj2DZmsjNjbPoE4i43_AGlyY6Dl4go

To claim this, I am signing this object:

@alopresto
alopresto / encrypt_decrypt.xml
Created August 25, 2017 19:28
Apache NiFi flow which encrypts and decrypts arbitrary text.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flowController encoding-version="1.1">
<maxTimerDrivenThreadCount>10</maxTimerDrivenThreadCount>
<maxEventDrivenThreadCount>5</maxEventDrivenThreadCount>
<rootGroup>
<id>0aeb4b5d-015e-1000-5a72-af7f84fd3776</id>
<name>NiFi Flow</name>
<position x="0.0" y="0.0"/>
<comment/>
<processor>
@alopresto
alopresto / mvn_dependency_tree.txt
Created August 14, 2017 22:38
The output of `mvn dependency:tree` after upgrading dependency versions. To find offending instances of `jackson-core`, use the regex `jackson-core:jar:2.[^8]`.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.nifi:nifi-standard-processors:jar:1.4.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.nifi:nifi-schema-registry-service-api:jar -> duplicate declaration of version (?) @ org.apache.nifi:nifi-standard-processors:[unknown-version], /Users/alopresto/Workspace/nifi/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml, line 360, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] Inspecting build with total of 328 modules...
@alopresto
alopresto / difference.xml
Created August 9, 2017 17:10
An Apache NiFi template which calculates the difference between two dates and converts to nanoseconds.
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description>An Apache NiFi template which calculates the difference between two dates and converts to nanoseconds. </description>
<groupId>cfcec95f-015b-1000-57b0-df55a3e3e4f9</groupId>
<name>Time Difference</name>
<snippet>
<connections>
<id>315a6dc1-c35b-3f1c-0000-000000000000</id>
<parentGroupId>b2395d19-fb61-3c86-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
@alopresto
alopresto / time_format.xml
Last active May 25, 2017 18:53
Apache NiFi template that trims the extra characters from the input string to allow the Java SimpleDateFormat parser to convert the source to a date in GMT.
<?xml version="1.0" ?>
<template encoding-version="1.1">
<description>Trims the extra characters from the input string to allow the Java SimpleDateFormat parser to convert the source to a date in GMT. </description>
<groupId>40c4c83b-015c-1000-9023-21cd583de301</groupId>
<name>Time formatting</name>
<snippet>
<connections>
<id>d33d0164-1f51-3d15-0000-000000000000</id>
<parentGroupId>23c9f5f5-9b7a-372c-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>