YARN-4350. TestDistributedShell fails for V2 scenarios. (Naganarasimha G R via Varun Saxena)

This commit is contained in:
Varun Saxena 2015-12-20 02:14:54 +05:30 committed by Sangjin Lee
parent 8ef546c1ee
commit eb0ac8efb1
3 changed files with 5 additions and 4 deletions

View File

@ -176,6 +176,8 @@ private void setupInternal(int numNodeManager, float timelineVersion)
conf.set(YarnConfiguration.TIMELINE_SERVICE_ENTITY_GROUP_PLUGIN_CLASSES,
DistributedShellTimelinePlugin.class.getName());
} else if (timelineVersion == 2.0f) {
// set version to 2
conf.setFloat(YarnConfiguration.TIMELINE_SERVICE_VERSION, 2.0f);
// disable v1 timeline server since we no longer have a server here
// enable aux-service based timeline aggregators
conf.set(YarnConfiguration.NM_AUX_SERVICES, TIMELINE_AUX_SERVICE_NAME);

View File

@ -36,6 +36,7 @@
import org.apache.hadoop.ha.HAServiceProtocol;
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.net.ServerSocketUtil;
import org.apache.hadoop.service.AbstractService;
import org.apache.hadoop.service.CompositeService;
import org.apache.hadoop.util.Shell;
@ -779,8 +780,8 @@ protected synchronized void serviceInit(Configuration conf)
if (!useFixedPorts) {
String hostname = MiniYARNCluster.getHostname();
conf.set(YarnConfiguration.TIMELINE_SERVICE_ADDRESS, hostname + ":0");
conf.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS, hostname
+ ":0");
conf.set(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS,
hostname + ":" + ServerSocketUtil.getPort(9188, 10));
}
appHistoryServer.init(conf);
super.serviceInit(conf);

View File

@ -74,8 +74,6 @@ public void testTimelineServiceStartInMiniCluster() throws Exception {
String hostname = MiniYARNCluster.getHostname();
Assert.assertEquals(hostname + ":0",
conf.get(YarnConfiguration.TIMELINE_SERVICE_ADDRESS));
Assert.assertEquals(hostname + ":0",
conf.get(YarnConfiguration.TIMELINE_SERVICE_WEBAPP_ADDRESS));
cluster.start();