[GitHub] [hbase] virajjasani commented on a change in pull request #2705: HBASE-25237 : 'hbase master stop' shuts down the cluster, not the master only

2020-11-26 Thread GitBox


virajjasani commented on a change in pull request #2705:
URL: https://github.com/apache/hbase/pull/2705#discussion_r531079247



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
##
@@ -139,7 +148,15 @@ public int run(String args[]) throws Exception {
 if ("start".equals(command)) {
   return startMaster();
 } else if ("stop".equals(command)) {
-  return stopMaster();
+  if (shutDownCluster) {
+return stopMaster();
+  }
+  System.err.println(
+"To shutdown the master run " +
+"hbase-daemon.sh stop master or send a kill signal to " +
+"the HMaster pid, " +
+"and to stop HBase Cluster run stop-hbase.sh or add --shutDownCluster 
with current command");

Review comment:
   nit:
   ```
   and to stop HBase Cluster run: "stop-hbase.sh" or "hbase master stop 
--shutDownCluster"
   ```

##
File path: bin/stop-hbase.sh
##
@@ -22,12 +22,24 @@
 
 # Stop hadoop hbase daemons.  Run this on master node.
 
+usage="Usage: stop-hbase.sh can only be used for shutting down entire cluster\
+ to shut down (HMaster|HRegionServer) use hbase-daemon.sh stop 
(master|regionserver)"

Review comment:
   Great!





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [hbase] virajjasani commented on a change in pull request #2705: HBASE-25237 : 'hbase master stop' shuts down the cluster, not the master only

2020-11-25 Thread GitBox


virajjasani commented on a change in pull request #2705:
URL: https://github.com/apache/hbase/pull/2705#discussion_r530833131



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
##
@@ -139,7 +148,15 @@ public int run(String args[]) throws Exception {
 if ("start".equals(command)) {
   return startMaster();
 } else if ("stop".equals(command)) {
-  return stopMaster();
+  if (shutDownCluster) {
+return stopMaster();
+  }
+  System.err.println(
+"To shutdown the master run " +
+"hbase-daemon.sh stop master or send a kill signal to " +
+"the HMaster pid, " +
+"and to stop HBase Cluster run stop-hbase.sh or add --forceStop with 
current command");

Review comment:
   Here we can specify the exact command to be used:
   ```
   and to stop HBase Cluster run: "stop-hbase.sh --shutDownCluster" or "hbase 
master stop --shutDownCluster" 
   ```
   Sounds good?

##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
##
@@ -62,7 +62,9 @@
 "   --localRegionServers= " +
   "RegionServers to start in master process when in standalone mode.\n" +
 "   --masters=Masters to start in this process.\n" +
-"   --backup   Master should start in backup mode";
+"   --backup   Master should start in backup mode" +
+"   --forceStop" +

Review comment:
   I think `forceStop` is generally referred to when we want to 
non-gracefully shutdown any service. Let's use flag `--shutDownCluster` instead.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [hbase] virajjasani commented on a change in pull request #2705: HBASE-25237 : 'hbase master stop' shuts down the cluster, not the master only

2020-11-24 Thread GitBox


virajjasani commented on a change in pull request #2705:
URL: https://github.com/apache/hbase/pull/2705#discussion_r530146588



##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
##
@@ -139,7 +148,15 @@ public int run(String args[]) throws Exception {
 if ("start".equals(command)) {
   return startMaster();
 } else if ("stop".equals(command)) {
-  return stopMaster();
+  if (shutDownCluster) {
+return stopMaster();
+  }
+  System.err.println(
+"To shutdown the master run " +
+"hbase-daemon.sh stop HMaster or send a kill signal to " +
+"the HMaster pid, " +
+"and to stop HBase Cluster run stop-hbase.sh or add --forceStop");

Review comment:
   nit: `and to stop HBase Cluster either run stop-hbase.sh or add 
--forceStop with current command`

##
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
##
@@ -139,7 +148,15 @@ public int run(String args[]) throws Exception {
 if ("start".equals(command)) {
   return startMaster();
 } else if ("stop".equals(command)) {
-  return stopMaster();
+  if (shutDownCluster) {
+return stopMaster();
+  }
+  System.err.println(
+"To shutdown the master run " +
+"hbase-daemon.sh stop HMaster or send a kill signal to " +

Review comment:
   Isn't it `hbase-daemon.sh stop master`?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org