Michael Stack created HBASE-25237: ------------------------------------- Summary: 'hbase master stop' shuts down the cluster, not the master only Key: HBASE-25237 URL: https://issues.apache.org/jira/browse/HBASE-25237 Project: HBase Issue Type: Improvement Reporter: Michael Stack
This is confusing (an operator at place-of-employment shut down a massive cluster mistakenly thinking he was shutting down the master only). If I run 'hbase master --help', it says unsupported and then dumps out: {code:java} org.apache.hbase.thirdparty.org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --help at org.apache.hbase.thirdparty.org.apache.commons.cli.Parser.processOption(Parser.java:383) at org.apache.hbase.thirdparty.org.apache.commons.cli.Parser.parse(Parser.java:210) at org.apache.hbase.thirdparty.org.apache.commons.cli.Parser.parse(Parser.java:88) at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:89) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149) at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2945) Usage: Master [opts] start|stop|clear start Start Master. If local mode, start Master and RegionServer in same JVM stop Start cluster shutdown; Master signals RegionServer shutdown clear Delete the master znode in ZooKeeper after a master crashes where [opts] are: --minRegionServers=<servers> Minimum RegionServers needed to host user tables. --localRegionServers=<servers> RegionServers to start in master process when in standalone mode. --masters=<servers> Masters to start in this process. --backup Master should start in backup mode{code} ... so the 'help' is clear that its the cluster that goes down, not just the master – but that is hardly compensates for the unexpected behavior. 'hbase master stop' is actually what is used internally you run stop-hbase.sh. Stopping the cluster when your run 'hbase master stop' is actually very old behavior. Its still confusing though. We could change this. If I run 'hbase regionserver stop', it does this: {code:java} System.err.println( "To shutdown the regionserver run " + "hbase-daemon.sh stop regionserver or send a kill signal to " + "the regionserver pid");{code} I'd think we could make improvement here. We could do something like the RS output if user types 'hbase master stop' at a minimum requiring operator add a '–force' flag if they want the cluster to go down or point them to a new hbase cluster stop/hbase cluster start or point them at stop-hbase.sh. Should also change mode so 'hbase master stop' stops the master and not the cluster (there was no stopMaster when the 'hbase master stop' was added originally – but there is one now). -- This message was sent by Atlassian Jira (v8.3.4#803005)