Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-3432

Yarn doesn't work if JAVA_HOME isn't set

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 0.23.0
    • None
    • mrv2
    • None
    • OS/X, JAVA_HOME unset

    Description

      libexec/hadoop-config.sh does reliably work out JAVA_HOME for many platforms. unfortunately, the yarn scripts don't use it. As such you get told off when you try to run yarn

      $ bin/yarn resourcemanager
      Error: JAVA_HOME is not set.
      
      

      To make things more interesting, if you set the value in the shell, it still doesn't propagate down to the scripts

      $ echo $JAVA_HOME
      
      $ source libexec/hadoop-config.sh 
      $ echo $JAVA_HOME
      /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
      $ bin/yarn resourcemanager
      Error: JAVA_HOME is not set.
      $echo $JAVA_HOME
      /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: