Apache NiFi Toolkit Guide
Also available as:
PDF

Usage

To show help:

./bin/s2s.sh -h

The following are available options:

  • --batchCount <arg> Number of flow files in a batch

  • --batchDuration <arg> Duration of a batch

  • --batchSize <arg> Size of flow files in a batch

  • -c,--compression Use compression

  • -d,--direction Direction (valid directions: SEND, RECEIVE) (default: SEND)

  • -h,--help Help Text (optional)

  • -i,--portIdentifier <arg> Port id

  • --keystore <arg> Keystore

  • --keyStorePassword <arg> Keystore password

  • --keyStoreType <arg> Keystore type (default: JKS)

  • -n,--portName Port name

  • -p,--transportProtocol Site to site transport protocol (default: RAW)

  • --peerPersistenceFile <arg> File to write peer information to so it can be recovered on restart

  • --penalization <arg> Penalization period

  • --proxyHost <arg> Proxy hostname

  • --proxyPassword <arg> Proxy password

  • --proxyPort <arg> Proxy port

  • --proxyUsername <arg> Proxy username

  • --timeout <arg> Timeout

  • --trustStore <arg> Truststore

  • --trustStorePassword <arg> Truststore password

  • --trustStoreType <arg> Truststore type (default: JKS)

  • -u,--url <arg> NiFI URL to connect to (default: http://localhost:8080/nifi)

The s2s cli input/output format is a JSON list of DataPackets. They can have the following formats:

[{"attributes":{"key":"value"},"data":"aGVsbG8gbmlmaQ=="}]

where data is the base64 encoded value of the FlowFile content (always used for received data) or:

[{"attributes":{"key":"value"},"dataFile":"/Users/pvillard/Documents/GitHub/nifi/nifi-toolkit/nifi-toolkit-assembly/target/nifi-toolkit-1.9.0-SNAPSHOT-bin/nifi-toolkit-1.9.0-SNAPSHOT/bin/EXAMPLE"}]

where dataFile is a file to read the FlowFile content from.

Example usage to send a FlowFile with the contents of "hey nifi" to a local unsecured NiFi over http with an input port named "input":

echo '[{"data":"aGV5IG5pZmk="}]' | bin/s2s.sh -n input -p http