Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master 6bc13e2de -> f58c13a65


ZEPPELIN-303 Zeppelin should exit when jettyServer.start() throws an exception

- Added exit condition while jetty cannot run properly

Author: Jongyoul Lee <[email protected]>

Closes #301 from jongyoul/ZEPPELIN-303 and squashes the following commits:

67f9ab7 [Jongyoul Lee] ZEPPELIN-303 Zeppelin should exit when 
jettyServer.start() throws an exception - Removed "TODO"
59d666f [Jongyoul Lee] ZEPPELIN-303 - Added exit condition while jetty cannot 
run properly


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/f58c13a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/f58c13a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/f58c13a6

Branch: refs/heads/master
Commit: f58c13a650ffa0d8946910bd585f734344ff1f6e
Parents: 6bc13e2
Author: Jongyoul Lee <[email protected]>
Authored: Mon Sep 14 12:23:15 2015 +0900
Committer: Lee moon soo <[email protected]>
Committed: Sat Sep 26 12:39:34 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/server/ZeppelinServer.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f58c13a6/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
----------------------------------------------------------------------
diff --git 
a/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java 
b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
index a37fc22..4e48901 100644
--- 
a/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
+++ 
b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java
@@ -99,8 +99,13 @@ public class ZeppelinServer extends Application {
     jettyServer.setHandler(contexts);
 
     LOG.info("Start zeppelin server");
-    jettyServer.start();
-    LOG.info("Started");
+    try {
+      jettyServer.start();
+    } catch (Exception e) {
+      LOG.error("Error while running jettyServer", e);
+      System.exit(-1);
+    }
+    LOG.info("Started zeppelin server");
 
     Runtime.getRuntime().addShutdownHook(new Thread(){
       @Override public void run() {

Reply via email to