Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5573

Allow overriding of nifi-env.sh

    XMLWordPrintableJSON

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:

      1. Have another environment variable NIFI_DISABLE_NIFIENV that basically exits the nifi-env.sh script if it's set
      2. 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.

      Attachments

        Activity

          People

            larsfrancke Lars Francke
            larsfrancke Lars Francke
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m