Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-6617

Hadoop Config shell script sets wrong environment if had previous hadoop path

    XMLWordPrintableJSON

Details

    Description

      I have previously installed Hadoop and had HADOOP_PREFIX, HADOOP_CONF_DIR in my environment.
      The hadoop-layout.sh and hadoop-config.sh was unable to set the hadoop environment correctly. It will give error "class not found" error when trying to start the HDFS service.

      To reproduce this error: ("/tmp" is some path other than the Hadoop path)
      $ export HADOOP_PREFIX=/tmp
      $ export HADOOP_CONF_DIR=/tmp
      $ source /usr/lib/hadoop/libexec/hadoop-config.sh
      $ hadoop version
      It will fail with class not found error.

      Fix: unset any HADOOP related variable at the beginning of "hadoop-config.sh"

      Attachments

        Activity

          People

            Unassigned Unassigned
            yixiaolin Yixiao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: