Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
(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.