You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2021/06/25 15:30:00 UTC

[jira] [Commented] (NIFI-5573) Allow overriding of nifi-env.sh

    [ https://issues.apache.org/jira/browse/NIFI-5573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17369534#comment-17369534 ] 

ASF subversion and git services commented on NIFI-5573:
-------------------------------------------------------

Commit 49d10dbcbd584075f9cfb0d04772fb553277c7da in nifi's branch refs/heads/main from Lars Francke
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=49d10db ]

NIFI-5573 Allow overriding of nifi-env.sh

This closes #2985.

Signed-off-by: Kevin Doran <kd...@apache.org>


> Allow overriding of nifi-env.sh
> -------------------------------
>
>                 Key: NIFI-5573
>                 URL: https://issues.apache.org/jira/browse/NIFI-5573
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Lars Francke
>            Assignee: Lars Francke
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> (as discussed in https://lists.apache.org/thread.html/ddfbff7f371d47c6da013ff14e28bce3b353716653a01649a408d0ce@%3Cdev.nifi.apache.org%3E)
> Currently nifi-env.sh unconditionally sets NIFI_HOME, NIFI_PID_DIR, NIFI_LOG_DIR and NIFI_ALLOW_EXPLICIT_KEYTAB so they can only be overridden by changing nifi-env.sh.
> Other *-env.sh files I looked at (e.g. from Hadoop or HBase) have most/all their settings commented out or only override variables if they have not already been set outside of the *-env.sh script.
> Peter and [~joewitt] witt from the mailing list are in favor of keeping the current behavior of the file unchanged due to the fear that it might break something for some people out there.
> There are a few different options I can think of on how to work around this:
>  # Have another environment variable NIFI_DISABLE_NIFIENV that basically exits the nifi-env.sh script if it's set
>  # NIFI_OVERRIDE_NIFIENV which - if set to true - allows externally set environment variables to override the ones in nifi-env.sh
> I'm sure there are more but those are the ones I can think of now.
> I'm in favor of option 2 as that allows me to selectively use the defaults from nifi-env.sh
>  
> I can provide a patch once we've agreed on a way to go forward.
>  
> This would help me tremendously in an environment where I cannot easily alter the nifi-env.sh file. This is also useful in the Docker image which currently wipes out the nifi-env.sh script so its own environment variable take effect.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)