HBASE-17014 Added clearly marked log messages for start and shutdown of services HMaster, HRegionServer, ThriftServer, RESTServer. Also changed the log level for RPCServer responder starting log message to debug.

Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Umesh Agashe 2016-11-03 10:27:01 -07:00 committed by Michael Stack
parent de97933aa5
commit 281bf9a222
5 changed files with 12 additions and 3 deletions

View File

@ -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() + "' *****");
}
}

View File

@ -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 {

View File

@ -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);
}

View File

@ -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")

View File

@ -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);
}
}