hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernando (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1687) bin/hbase script doesn't allow for different memory settings for each daemon type
Date Thu, 23 Jul 2009 18:16:14 GMT

    [ https://issues.apache.org/jira/browse/HBASE-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734677#action_12734677

Fernando commented on HBASE-1687:

Sorry about not being in a patch form, I have been a little lazy because I actually built
it in ec2.. since at the moment I can't do 1.6 dev work on my workstation :( (soon).  So I
just copied the whole file :)

It is from the latest trunk if you want to generate the diff.. :)  else I'll do it later today
or tomorrow...

The bash "contains" ( == *-Xmx* )  I got from a StackOverflow question.  I am not a bash expert,
so I just googled "bash contains", and people suggested various things ( like using grep ),
but this one did show up a few times, so I went with it.. it looked a little big cleaner.

> bin/hbase script doesn't allow for different memory settings for each daemon type
> ---------------------------------------------------------------------------------
>                 Key: HBASE-1687
>                 URL: https://issues.apache.org/jira/browse/HBASE-1687
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: Fernando
>         Attachments: hbase
> 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,
> 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'
> elif [ "$COMMAND" = "regionserver" ] ; then
>   CLASS='org.apache.hadoop.hbase.regionserver.HRegionServer'
> the new environment variables can then be added to hbase-env.sh as empty:
> ..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
> as such:
> # 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..

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message