From 845b83b8b679697a072ee91ea1d3ced52dabbe5b Mon Sep 17 00:00:00 2001 From: Guangxu Cheng Date: Tue, 26 Sep 2017 15:33:02 +0800 Subject: [PATCH] HBASE-18880 Failed to start rest server if the value of hbase.rest.threads.max is too small. Signed-off-by: Michael Stack --- .../java/org/apache/hadoop/hbase/rest/RESTServer.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 2b4cc19bed7..907a220544c 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 @@ -353,9 +353,14 @@ public class RESTServer implements Constants { infoServer.setAttribute("hbase.conf", conf); infoServer.start(); } - // start server - server.start(); - server.join(); + try { + // start server + server.start(); + server.join(); + } catch (Exception e) { + LOG.fatal("Failed to start server", e); + System.exit(1); + } LOG.info("***** STOPPING service '" + RESTServer.class.getSimpleName() + "' *****"); } }