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

Fernando commented on HBASE-1687:
---------------------------------

sadly, hadoop has this bug as well :)

I submitted pretty much this exact same bug against bin/hadoop :) (just changed 
hadoop with hbase)

I just realized, it's hard to see because this wiki thinks I'm trying to bold 
the code, but there are '*' around the -Xmx, those are bash globs..  so it 
means.. if the $var equals <glob>-Xmx<glob> so it should match -Xmx anywhere in 
the string.. try it out..

you should be able to create a simple bash file.. that has a variable, then an 
if statement like above, then echo "CONTAINS" else echo "NOT CONTAINS", and 
you'll see it working..

> 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, 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:
> # 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.

Reply via email to