From 8c11007b7c1b59c2fd3d6e6aa1e12f997dd90455 Mon Sep 17 00:00:00 2001 From: Guanghao Zhang Date: Mon, 21 Sep 2020 08:27:38 +0800 Subject: [PATCH] Revert "HBASE-24976 Printing the swallowed exception" This reverts commit 8efd2509e9f4d44a699f0ad0e50c0b7ca7ad2b2a. --- .../java/org/apache/hadoop/hbase/rest/RESTServer.java | 10 +++++++--- 1 file changed, 7 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 c6f769ee605..2ad57e1b742 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 @@ -382,8 +382,13 @@ public class RESTServer implements Constants { this.infoServer.setAttribute("hbase.conf", conf); this.infoServer.start(); } - // start server - server.start(); + try { + // start server + server.start(); + } catch (Exception e) { + LOG.error(HBaseMarkers.FATAL, "Failed to start server", e); + throw e; + } } public synchronized void join() throws Exception { @@ -437,7 +442,6 @@ public class RESTServer implements Constants { server.run(); server.join(); } catch (Exception e) { - LOG.error(HBaseMarkers.FATAL, "Failed to start server", e); System.exit(1); }