[ 
https://issues.apache.org/jira/browse/BIGTOP-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13630275#comment-13630275
 ] 

Sean Mackrory edited comment on BIGTOP-732 at 4/12/13 4:34 PM:
---------------------------------------------------------------

>> it seems that you're only using the new template for the regionservers, yet 
>> it has all sorts of 'if [ "@HBASE_DAEMON@" == "master" ] ; then' code 
>> blocks. Am I missing something?

HBase supports doing this with multiple masters as well, so I wanted the 
template to be flexible. The template is only used for region servers because 
there are good reasons to colocate multiple region servers in production, but 
colocating multiple masters is, AFAIK, only useful for testing features like 
automatic failover in development.

>> we should probably simplify Autodetect JAVA_HOME block since now we have 
>> standardized on a common location for bigtop-detect-javahome

Good one - will do.

>> The block of code '# Our default HBASE_HOME, HBASE_PID_DIR and 
>> HBASE_CONF_DIR' likely belongs to /etc/default/hbase (only then the 
>> following if statement is actually useful)

Good one - will change...

>> Would it be completely unreasonable to also make FIRST_PORT/FIRST_INFO_PORT 
>> tweakable for both types of daemons in /etc/default/hbase (via calling them 
>> MASTER_FIRST_PORT, REGIONSERVER_FIRST_PORT, etc)

No, I think that's reasonable. Will add.

>> does the following ever yield false? 'if [ "@HBASE_DAEMON@" != 
>> "regionserver" -a "@HBASE_DAEMON@" != "master" ] ; then'

Only if somebody really goes out of their way to mess stuff up - as I said in 
#1, the template was written for both regionservers and master, hence the 
flexibility, but I have no idea how well it works with the other 2 HBase 
daemons we package.

>> And my final question – does this patch change the default behaviour/output 
>> for the case of a single daemon per node?

It should not, and in my testing, it does not. I was very careful to make sure 
that if you invoke the script with only 1 argument (start, stop, etc.) - it 
only calls the original function - it does not attempt _any_ of the new logic 
at all.
                
      was (Author: mackrorysd):
    >> it seems that you're only using the new template for the regionservers, 
yet it has all sorts of 'if [ "@HBASE_DAEMON@" == "master" ] ; then' code 
blocks. Am I missing something?

HBase supports doing this with multiple masters as well, so I wanted the 
template to be flexible. The template is only used for region servers because 
there are good reasons to colocate multiple region servers in production, but 
colocating multiple masters is, AFAIK, only useful for testing features like 
automatic failover in development.

>> we should probably simplify Autodetect JAVA_HOME block since now we have 
>> standardized on a common location for bigtop-detect-javahome

Good one - will do.

>> The block of code '# Our default HBASE_HOME, HBASE_PID_DIR and 
>> HBASE_CONF_DIR' likely belongs to /etc/default/hbase (only then the 
>> following if statement is actually useful)

If this text is here it means I forgot to come back and look at this before 
clicking 'Add'

>> Would it be completely unreasonable to also make FIRST_PORT/FIRST_INFO_PORT 
>> tweakable for both types of daemons in /etc/default/hbase (via calling them 
>> MASTER_FIRST_PORT, REGIONSERVER_FIRST_PORT, etc)

No, I think that's reasonable. Will add.

>> does the following ever yield false? 'if [ "@HBASE_DAEMON@" != 
>> "regionserver" -a "@HBASE_DAEMON@" != "master" ] ; then'

Only if somebody really goes out of their way to mess stuff up - as I said in 
#1, the template was written for both regionservers and master, hence the 
flexibility, but I have no idea how well it works with the other 2 HBase 
daemons we package.

>> And my final question – does this patch change the default behaviour/output 
>> for the case of a single daemon per node?

It should not, and in my testing, it does not. I was very careful to make sure 
that if you invoke the script with only 1 argument (start, stop, etc.) - it 
only calls the original function - it does not attempt _any_ of the new logic 
at all.
                  
> Support running multiple HBase region servers
> ---------------------------------------------
>
>                 Key: BIGTOP-732
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-732
>             Project: Bigtop
>          Issue Type: New Feature
>            Reporter: Sean Mackrory
>            Assignee: Sean Mackrory
>         Attachments: 
> 0001-BIGTOP-732.-Support-running-multiple-HBase-region-se.patch, 
> BIGTOP-732.patch.1, BIGTOP-732.patch.2, BIGTOP-732.patch.3, 
> BIGTOP-732.patch.4, BIGTOP-732.patch.5
>
>
> Previously on the mailing list I submitted the idea of supporting multiple 
> region server daemons on the same system. This can be done using the 
> local-regionservers.sh and local-masters.sh scripts that we remove from our 
> packaging (see BIGTOP-503), but apparently running multiple region servers in 
> production can be useful. It should be possible through init scripts, and it 
> should play nice with the more traditional use case.
> The modified init script template should make it safe and intuitive to run 
> multiple region servers and masters on the same system, but only the 
> regionserver package is using the new template - I don't know of a good 
> reason to run multiple masters in production. Using the init script as before 
> will control a single region-server daemon EXACTLY as it did before. If you 
> specify numbers as additional parameters, you can control multiple daemons: 
> {noformat} 
> service hbase-regionserver start # Starts a single region server daemon, as 
> before
> (all other commands, with no additional parameters, will work as before)
> service hbase-regionserver start 1 2 3 4 # Starts a single region server 
> daemon
> service hbase-regionserver restart 2 4 # Restarts the even daemons
> service hbase-regionserver stop 1 3 # Stops the odd daemons
> service hbase-regionserver stop # Stops all region servers in any mode of 
> operation
> service hbase-regionserver restart 1 2 3 # Stops all region servers, then 
> starts these 3
> {noformat} 
> I can see a case being made for changing the behavior of the stop and restart 
> commands - so let me know if you disagree with the path I took. The log files 
> and pid files get put in the same directory, but are also numbered according 
> to their offset. The force-stop and force-reload command should also work as 
> expected. When running a single daemon you can't start multiple daemons, and 
> vice-versa. As recommended by Bruno for LSB-compliance and ease of 
> administration, you can specify the offsets in 
> /etc/hbase/conf/regionserver_offsets instead of on the command-line. 
> Specifying offsets on the command-line anyway will override the file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to