From 7e9534746c641dab81f910eedd33cca42cb8a9aa 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 0e4712d3911..e3a9cd16bb3 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 @@ -355,9 +355,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() + "' *****"); } }