[
https://issues.apache.org/jira/browse/NIFI-16399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120928#comment-18120928
]
Mike Thomsen commented on NIFI-16399:
-------------------------------------
[~exceptionfactory] continuing here at your request.
The goal of this ticket and PR is simple: create a cross-platform,
language-neutral method for any process that is kicked off with
ExecuteStreamCommand to provide a signal back to ExecuteStreamCommand about
flowfile attributes that need to be updated.
Based on my research, a temp file is the only simple, cross-platform, secure
way to accomplish this. This ticket would allow ExecuteStreamCommand to either
create or signal a temp file location, let the executed process write a JSON
document and then apply the updates described in the JSON document.
The intended contract for that JSON is simply Map<String, String> in Java, like
the attributes themselves.
A parent process cannot read back child process environment variables, so that
avenue is closed to us. If someone has a script, Rust/C/C++ app that wants to
signal updates, etc. currently they'd have to manually build a process to read
and apply updates by hand downstream of ExecuteStreamCommand.
I agree that writing a JSON temp file every iteration is problematic, but the
current version of the PR only does that when an optional (off by default)
property is enabled in the processor's configuration. After talking with you, I
think this should be refactored into NiFi merely providing a signal in this
configuration scenario which amounts to "if you want to supply updates to the
attributes, I will look for a file here."
> Enable attribute updates from ExecuteStreamCommand
> --------------------------------------------------
>
> Key: NIFI-16399
> URL: https://issues.apache.org/jira/browse/NIFI-16399
> Project: Apache NiFi
> Issue Type: Improvement
> Reporter: Mike Thomsen
> Assignee: Mike Thomsen
> Priority: Major
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> This change will create an optional mode where ExecuteStreamCommand will
> write a temp file to the file system that can be used by the executed command
> to communicate updates to the flowfile attributes. It will be a flat json
> document.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)