svn merge -c 1437775 FIXES: YARN-354. WebAppProxyServer exits immediately after startup. Contributed by Lian Xie
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1437776 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eaf5cea54f
commit
1321717f60
|
@ -314,6 +314,9 @@ Release 0.23.6 - UNRELEASED
|
||||||
|
|
||||||
YARN-334. Maven RAT plugin is not checking all source files (tgraves)
|
YARN-334. Maven RAT plugin is not checking all source files (tgraves)
|
||||||
|
|
||||||
|
YARN-354. WebAppProxyServer exits immediately after startup (Liang Xie via
|
||||||
|
jlowe)
|
||||||
|
|
||||||
Release 0.23.5 - 2012-11-28
|
Release 0.23.5 - 2012-11-28
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -114,4 +114,13 @@ public class WebAppProxy extends AbstractService {
|
||||||
}
|
}
|
||||||
super.stop();
|
super.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void join() {
|
||||||
|
if(proxyServer != null) {
|
||||||
|
try {
|
||||||
|
proxyServer.join();
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,14 @@ public class WebAppProxyServer extends CompositeService {
|
||||||
YarnConfiguration.PROXY_PRINCIPAL);
|
YarnConfiguration.PROXY_PRINCIPAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wait for service to finish.
|
||||||
|
* (Normally, it runs forever.)
|
||||||
|
*/
|
||||||
|
private void join() {
|
||||||
|
proxy.join();
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
Thread.setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler());
|
||||||
StringUtils.startupShutdownMessage(WebAppProxyServer.class, args, LOG);
|
StringUtils.startupShutdownMessage(WebAppProxyServer.class, args, LOG);
|
||||||
|
@ -84,6 +92,7 @@ public class WebAppProxyServer extends CompositeService {
|
||||||
YarnConfiguration conf = new YarnConfiguration();
|
YarnConfiguration conf = new YarnConfiguration();
|
||||||
proxy.init(conf);
|
proxy.init(conf);
|
||||||
proxy.start();
|
proxy.start();
|
||||||
|
proxy.join();
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
LOG.fatal("Error starting Proxy server", t);
|
LOG.fatal("Error starting Proxy server", t);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
|
|
Loading…
Reference in New Issue