Author: tgraves Date: Mon Jan 28 16:06:06 2013 New Revision: 1439467 URL: http://svn.apache.org/viewvc?rev=1439467&view=rev Log: YARN-354. WebAppProxyServer exits immediately after startup (Liang Xie via jlowe)
Modified: hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/CHANGES.txt hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServer.java Modified: hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/CHANGES.txt?rev=1439467&r1=1439466&r2=1439467&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/CHANGES.txt Mon Jan 28 16:06:06 2013 @@ -57,6 +57,9 @@ Release 0.23.6 - UNRELEASED YARN-170. NodeManager stop() gets called twice on shutdown (Sandy Ryza via tgraves) + YARN-354. WebAppProxyServer exits immediately after startup (Liang Xie via + jlowe) + Release 0.23.5 - 2012-11-28 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java?rev=1439467&r1=1439466&r2=1439467&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java (original) +++ hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxy.java Mon Jan 28 16:06:06 2013 @@ -114,4 +114,13 @@ public class WebAppProxy extends Abstrac } super.stop(); } + + public void join() { + if(proxyServer != null) { + try { + proxyServer.join(); + } catch (InterruptedException e) { + } + } + } } Modified: hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServer.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServer.java?rev=1439467&r1=1439466&r2=1439467&view=diff ============================================================================== --- hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServer.java (original) +++ hadoop/common/branches/branch-0.23.6/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServer.java Mon Jan 28 16:06:06 2013 @@ -73,6 +73,14 @@ public class WebAppProxyServer extends C YarnConfiguration.PROXY_PRINCIPAL); } + /** + * Wait for service to finish. + * (Normally, it runs forever.) + */ + private void join() { + proxy.join(); + } + public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler()); StringUtils.startupShutdownMessage(WebAppProxyServer.class, args, LOG); @@ -84,6 +92,7 @@ public class WebAppProxyServer extends C YarnConfiguration conf = new YarnConfiguration(); proxy.init(conf); proxy.start(); + proxy.join(); } catch (Throwable t) { LOG.fatal("Error starting Proxy server", t); System.exit(-1);