Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-1329

yarn-config.sh overwrites YARN_CONF_DIR indiscriminately

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • None

    Description

      The script yarn-daemons.sh calls

      ${HADOOP_LIBEXEC_DIR}/yarn-config.sh

      yarn-config.sh overwrites any previously set value of environment variable YARN_CONF_DIR starting at line 40:

      yarn-config.sh
      #check to see if the conf dir is given as an optional argument
      if [ $# -gt 1 ]
      then
          if [ "--config" = "$1" ]
      	  then
      	      shift
      	      confdir=$1
      	      shift
      	      YARN_CONF_DIR=$confdir
          fi
      fi
       
      # Allow alternate conf dir location.
      export YARN_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
      

      The last line should check for the existence of YARN_CONF_DIR first.

      DEFAULT_CONF_DIR="${HADOOP_CONF_DIR:-$YARN_HOME/conf}"
      export YARN_CONF_DIR="${YARN_CONF_DIR:-$DEFAULT_CONF_DIR}"
      

      Attachments

        1. YARN-1329.patch
          0.6 kB
          haosdent

        Activity

          People

            haosdent@gmail.com haosdent
            aagottlieb Aaron Gottlieb
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: