YARN-538. RM address DNS lookup can cause unnecessary slowness on every JHS page load. (sandyr via tucu)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1464197 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0e9f61addc
commit
2100e93b04
@ -185,6 +185,9 @@ Release 2.0.5-beta - UNRELEASED
|
||||
YARN-101. Fix NodeManager heartbeat processing to not lose track of completed
|
||||
containers in case of dropped heartbeats. (Xuan Gong via vinodkv)
|
||||
|
||||
YARN-538. RM address DNS lookup can cause unnecessary slowness on every JHS
|
||||
page load. (sandyr via tucu)
|
||||
|
||||
Release 2.0.4-alpha - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -717,21 +717,16 @@ public static String getProxyHostAndPort(Configuration conf) {
|
||||
}
|
||||
|
||||
public static String getRMWebAppHostAndPort(Configuration conf) {
|
||||
int port = conf.getSocketAddr(
|
||||
InetSocketAddress address = conf.getSocketAddr(
|
||||
YarnConfiguration.RM_WEBAPP_ADDRESS,
|
||||
YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS,
|
||||
YarnConfiguration.DEFAULT_RM_WEBAPP_PORT).getPort();
|
||||
// Use apps manager address to figure out the host for webapp
|
||||
String host = conf.getSocketAddr(
|
||||
YarnConfiguration.RM_ADDRESS,
|
||||
YarnConfiguration.DEFAULT_RM_ADDRESS,
|
||||
YarnConfiguration.DEFAULT_RM_PORT).getHostName();
|
||||
InetSocketAddress address = NetUtils.createSocketAddrForHost(host, port);
|
||||
YarnConfiguration.DEFAULT_RM_WEBAPP_PORT);
|
||||
address = NetUtils.getConnectAddress(address);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
InetAddress resolved = address.getAddress();
|
||||
if (resolved == null || resolved.isAnyLocalAddress() ||
|
||||
resolved.isLoopbackAddress()) {
|
||||
String lh = host;
|
||||
String lh = address.getHostName();
|
||||
try {
|
||||
lh = InetAddress.getLocalHost().getCanonicalHostName();
|
||||
} catch (UnknownHostException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user