GitHub user michalklempa opened a pull request:
https://github.com/apache/nifi/pull/205
Fixed: ExecuteStreamCommand when expressions in command arguments areâ¦
⦠used, contents are not splitted by command separator
To reproduce the problem:
1. Create DataFlow
2. Add GenerateFlowFile processor, File Size: 10kB
3. Connect GenerateFlowFile -> success -> UpdateAttribute processor
4. In UpdateAttribute: create attribute optionalArgs with contents: "-c 5"
5. Connect UpdateAttribute -> success -> ExecuteStreamCommand
6. Configure ExecuteStreamCommand to execute Command Path: "ping", Command
Arguments: "${optionalArgs} google.com", Argument Delimiter: " " (spacebar),
Ignore STDIN: true, auto terminate: original
7. Connect ExecuteStreamCommand -> output stream - > LogAttribute to see
some output. LogAttribute auto terminate: success, Log Level: error, Log
Payload: true.
8. Run the flow.
Expected output:
1. ExecuteStreamCommand issues command ping with args: "-c", "5",
"google.com"
Actual output:
1. ExecuteStreamCommand puts the "-c 5" into single arg for ProcessBuilder
This behavior is no problem for ping utility, but there are tools (like
snmpwalk in my case), which are dumb enough not to parse command line arguments
properly, when they are sent inproperly by ProcessBuilder.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/michalklempa/nifi master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/205.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #205
----
commit 29da314d9327a880fe371e0c6c04d0777685b8b1
Author: Michal Klempa <[email protected]>
Date: 2016-02-05T12:28:15Z
Fixed: ExecuteStreamCommand when expressions in command arguments are used,
contents are not splitted by command separator
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---