Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4063

Unable to change JAVA_HOME directory in hadoop-setup-conf.sh script.

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.0.3, 1.1.0, 2.0.2-alpha
    • Fix Version/s: None
    • Component/s: scripts, tools
    • Labels:
    • Environment:

      Fedora 17 3.3.4-5.fc17.x86_64t, java version "1.7.0_06-icedtea", Rackspace Cloud (NextGen)

    • Release Note:
      Fixed a bug in hadoop-setup-conf.sh script which does not accept any change to JAVA_HOME directory.
    • Tags:
      config
    • Target Version/s:

      Description

      The JAVA_HOME directory remains unchanged no matter what you enter when you run hadoop-setup-conf.sh to generate hadoop configurations. Please see below example:

      *********************************************************
      [root@hadoop-slave ~]# /sbin/hadoop-setup-conf.sh
      Setup Hadoop Configuration

      Where would you like to put config directory? (/etc/hadoop)
      Where would you like to put log directory? (/var/log/hadoop)
      Where would you like to put pid directory? (/var/run/hadoop)
      What is the host of the namenode? (hadoop-slave)
      Where would you like to put namenode data directory? (/var/lib/hadoop/hdfs/namenode)
      Where would you like to put datanode data directory? (/var/lib/hadoop/hdfs/datanode)
      What is the host of the jobtracker? (hadoop-slave)
      Where would you like to put jobtracker/tasktracker data directory? (/var/lib/hadoop/mapred)
      Where is JAVA_HOME directory? (/usr/java/default) /usr/lib/jvm/jre
      Would you like to create directories/copy conf files to localhost? (Y/n)

      Review your choices:

      Config directory : /etc/hadoop
      Log directory : /var/log/hadoop
      PID directory : /var/run/hadoop
      Namenode host : hadoop-slave
      Namenode directory : /var/lib/hadoop/hdfs/namenode
      Datanode directory : /var/lib/hadoop/hdfs/datanode
      Jobtracker host : hadoop-slave
      Mapreduce directory : /var/lib/hadoop/mapred
      Task scheduler : org.apache.hadoop.mapred.JobQueueTaskScheduler
      JAVA_HOME directory : /usr/java/default
      Create dirs/copy conf files : y

      Proceed with generate configuration? (y/N) n
      User aborted setup, exiting...
      *********************************************************

      Resolution:
      Amend line 509 in file /sbin/hadoop-setup-conf.sh

      from:

      JAVA_HOME=$

      {USER_USER_JAVA_HOME:-$JAVA_HOME}

      to:

      JAVA_HOME=$

      {USER_JAVA_HOME:-$JAVA_HOME}

      will resolve this issue.

        Activity

        Hide
        Matt Foley added a comment -

        Changed Target Version to 1.3.0 upon release of 1.2.0. Please change to 1.2.1 if you intend to submit a fix for branch-1.2.

        Show
        Matt Foley added a comment - Changed Target Version to 1.3.0 upon release of 1.2.0. Please change to 1.2.1 if you intend to submit a fix for branch-1.2.
        Matt Foley made changes -
        Target Version/s 1.2.0, 2.0.3-alpha [ 12321657, 12323274 ] 2.0.3-alpha, 1.3.0 [ 12323274, 12324328 ]
        Matt Foley made changes -
        Target Version/s 1.1.1, 2.0.3-alpha [ 12321656, 12323274 ] 1.2.0, 2.0.3-alpha [ 12321657, 12323274 ]
        Matt Foley made changes -
        Target Version/s 1.0.4, 1.1.1, 2.0.3-alpha [ 12322463, 12321656, 12323274 ] 1.1.1, 2.0.3-alpha [ 12321656, 12323274 ]
        Hide
        Matt Foley added a comment -

        1.0.4 was released without this patch. Removing it from Target Versions list.
        Next opportunity is 1.1.1.

        Show
        Matt Foley added a comment - 1.0.4 was released without this patch. Removing it from Target Versions list. Next opportunity is 1.1.1.
        Hide
        Aaron T. Myers added a comment -

        Given the discussion on HADOOP-8925 which talks about removing packaging from hadoop does it make sense to wait for resolution and close this as wont fix after that?

        +1

        Show
        Aaron T. Myers added a comment - Given the discussion on HADOOP-8925 which talks about removing packaging from hadoop does it make sense to wait for resolution and close this as wont fix after that? +1
        Hide
        Arpit Gupta added a comment -

        These scripts were written to help with setup for rpm's being generated. Given the discussion on HADOOP-8925 which talks about removing packaging from hadoop does it make sense to wait for resolution and close this as wont fix after that?

        Show
        Arpit Gupta added a comment - These scripts were written to help with setup for rpm's being generated. Given the discussion on HADOOP-8925 which talks about removing packaging from hadoop does it make sense to wait for resolution and close this as wont fix after that?
        Haoquan Wang made changes -
        Fix Version/s 1.0.3 [ 12320249 ]
        Haoquan Wang made changes -
        Affects Version/s 1.1.0 [ 12317959 ]
        Affects Version/s 1.1.1 [ 12321656 ]
        Haoquan Wang made changes -
        Target Version/s 1.0.4 [ 12322463 ] 1.0.4, 1.1.1, 2.0.3-alpha [ 12322463, 12321656, 12323274 ]
        Haoquan Wang made changes -
        Affects Version/s 2.0.2-alpha [ 12322472 ]
        Affects Version/s 1.1.1 [ 12321656 ]
        Steve Loughran made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Steve Loughran added a comment -

        reopening as it isn't fixed until the patch is checked in.

        Show
        Steve Loughran added a comment - reopening as it isn't fixed until the patch is checked in.
        Haoquan Wang made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Haoquan Wang added a comment -

        Amend line 509 in file /sbin/hadoop-setup-conf.sh

        from:

        JAVA_HOME=$

        {USER_USER_JAVA_HOME:-$JAVA_HOME}

        to:

        JAVA_HOME=$

        {USER_JAVA_HOME:-$JAVA_HOME}

        will resolve this issue.

        Show
        Haoquan Wang added a comment - Amend line 509 in file /sbin/hadoop-setup-conf.sh from: JAVA_HOME=$ {USER_USER_JAVA_HOME:-$JAVA_HOME} to: JAVA_HOME=$ {USER_JAVA_HOME:-$JAVA_HOME} will resolve this issue.
        Haoquan Wang created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Haoquan Wang
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development