HBase
  1. HBase
  2. HBASE-1687

bin/hbase script doesn't allow for different memory settings for each daemon type

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.20.1
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      bin/hbase assumes that all daemon types ( master, regionserver ), all use the same memory settings.. (HBASE_HEAPSIZE).

      1) I propose adding daemon specific OPTS much like hadoop already has ( HBASE_MASTER_OPTS, HBASE_REGIONSERVER_OPTS ).

      So in bin/hbase, we would merge in the daemon specific opts within the case statement as such:

      elif [ "$COMMAND" = "master" ] ; then
      CLASS='org.apache.hadoop.hbase.master.HMaster'
      HBASE_OPTS="$HBASE_OPTS $HBASE_MASTER_OPTS"
      elif [ "$COMMAND" = "regionserver" ] ; then
      CLASS='org.apache.hadoop.hbase.regionserver.HRegionServer'
      HBASE_OPTS="$HBASE_OPTS $HBASE_REGIONSERVER_OPTS"

      the new environment variables can then be added to hbase-env.sh as empty:

      export HBASE_MASTER_OPTS=""
      export HBASE_REGIONSERVER=""
      ..etc

      2) I propose changes to that script to allow overriding the default memory ( HBASE_HEAPSIZE ), with daemon specific OPTS (HBASE_MASTER_OPTS, etc ).

      Basically at the bottom of the bin/hbase script, it will check to see if the user has already set "-Xmx" in the HBASE_OPTS variable.. if so, then it will ignore the JAVA_HEAP_SIZE variable..

      as such:

      1. run it
        if [[ $HBASE_OPTS == -Xmx ]]; then
        exec "$JAVA" $HBASE_OPTS -classpath "$CLASSPATH" $CLASS "$@"
        else
        exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS -classpath "$CLASSPATH" $CLASS "$@"
        fi

      I will attach the file as I have modified it..

      1. hbase
        7 kB
        Fernando Padilla
      2. HBASE-1687-ryan.patch
        1.0 kB
        ryan rawson
      3. hbase-script.diff
        1 kB
        Fernando Padilla

        Activity

        stack made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        ryan rawson made changes -
        Attachment HBASE-1687-ryan.patch [ 12419231 ]
        ryan rawson made changes -
        Fix Version/s 0.20.1 [ 12313606 ]
        Fernando Padilla made changes -
        Attachment hbase-script.diff [ 12414398 ]
        Fernando Padilla made changes -
        Field Original Value New Value
        Attachment hbase [ 12414299 ]
        Fernando Padilla created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Fernando Padilla
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development