Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6101

CDPATH environment variable causes bin scripts to fail.

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 0.19.1
    • None
    • scripts
    • None

    Description

      Most of the scripts in bin/* assume that cd produces no output. But when using bash (and some other shells) cd will output the destination directory if the CDPATH environment variable is set. CDPATH is very useful, and it's unfortunate to have to unset it to use Hadoop.

      The offending line (in start-all.sh, though most of the scripts exhibit the problem) is:

      bin=`cd "$bin"; pwd`

      Adding this to the top of each affected script will fix the problem:

      unset CDPATH

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            technomancy Phil Hagelberg
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment