diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java index a5c78bfd75a..00fd8340a87 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RESTServer.java @@ -213,6 +213,7 @@ public class RESTServer implements Constants { * @throws Exception exception */ public static void main(String[] args) throws Exception { + LOG.info("***** STARTING service '" + RESTServer.class.getSimpleName() + "' *****"); VersionInfo.logVersion(); Configuration conf = HBaseConfiguration.create(); UserProvider userProvider = UserProvider.instantiate(conf); @@ -313,5 +314,6 @@ public class RESTServer implements Constants { // start server server.start(); server.join(); + LOG.info("***** STOPPING service '" + RESTServer.class.getSimpleName() + "' *****"); } } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 64fe8355864..1c2d51f63c3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -1015,7 +1015,7 @@ public class RpcServer implements RpcServerInterface, ConfigurationObserver { @Override public void run() { - LOG.info(getName() + ": starting"); + LOG.debug(getName() + ": starting"); try { doRunLoop(); } finally { diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index beec198fff9..41718729e62 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -2476,6 +2476,7 @@ public class HMaster extends HRegionServer implements MasterServices { * @see org.apache.hadoop.hbase.master.HMasterCommandLine */ public static void main(String [] args) { + LOG.info("***** STARTING service '" + HMaster.class.getSimpleName() + "' *****"); VersionInfo.logVersion(); new HMasterCommandLine(HMaster.class).doMain(args); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 495aace114c..73dc265d6a3 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -1953,6 +1953,7 @@ public class HRegionServer extends HasThread implements @Override public void stop(final String msg) { if (!this.stopped) { + LOG.info("***** STOPPING region server '" + this + "' *****"); try { if (this.rsHost != null) { this.rsHost.preStop(msg); @@ -2226,7 +2227,7 @@ public class HRegionServer extends HasThread implements */ @Override public void abort(String reason, Throwable cause) { - String msg = "ABORTING region server " + this + ": " + reason; + String msg = "***** ABORTING region server " + this + ": " + reason + " *****"; if (cause != null) { LOG.fatal(msg, cause); } else { @@ -2851,6 +2852,7 @@ public class HRegionServer extends HasThread implements * @see org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine */ public static void main(String[] args) throws Exception { + LOG.info("***** STARTING service '" + HRegionServer.class.getSimpleName() + "' *****"); VersionInfo.logVersion(); Configuration conf = HBaseConfiguration.create(); @SuppressWarnings("unchecked") diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index 560f788a050..254c4b70981 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -235,11 +235,15 @@ public class ThriftServer { * @throws Exception */ public static void main(String [] args) throws Exception { + LOG.info("***** STARTING service '" + ThriftServer.class.getSimpleName() + "' *****"); VersionInfo.logVersion(); + int exitCode = 0; try { new ThriftServer(HBaseConfiguration.create()).doMain(args); } catch (ExitCodeException ex) { - System.exit(ex.getExitCode()); + exitCode = ex.getExitCode(); } + LOG.info("***** STOPPING service '" + ThriftServer.class.getSimpleName() + "' *****"); + System.exit(exitCode); } }