|
@@ -256,8 +256,6 @@ public class TestLinuxContainerExecutorWithMocks {
|
|
|
|
|
|
@Test (timeout = 5000)
|
|
|
public void testStartLocalizer() throws IOException {
|
|
|
-
|
|
|
-
|
|
|
InetSocketAddress address = InetSocketAddress.createUnresolved("localhost", 8040);
|
|
|
Path nmPrivateCTokensPath= new Path("file:///bin/nmPrivateCTokensPath");
|
|
|
|
|
@@ -272,25 +270,31 @@ public class TestLinuxContainerExecutorWithMocks {
|
|
|
.build());
|
|
|
|
|
|
List<String> result=readMockParams();
|
|
|
- Assert.assertEquals(result.size(), 24);
|
|
|
+ Assert.assertEquals(result.size(), 25);
|
|
|
Assert.assertEquals(result.get(0), YarnConfiguration.DEFAULT_NM_NONSECURE_MODE_LOCAL_USER);
|
|
|
Assert.assertEquals(result.get(1), "test");
|
|
|
Assert.assertEquals(result.get(2), "0" );
|
|
|
- Assert.assertEquals(result.get(3),"application_0" );
|
|
|
- Assert.assertEquals(result.get(4), "/bin/nmPrivateCTokensPath");
|
|
|
- Assert.assertEquals(result.get(8), "-classpath" );
|
|
|
- Assert.assertEquals(result.get(11), "-Xmx256m" );
|
|
|
- Assert.assertEquals(result.get(12), "-Dlog4j.configuration=container-log4j.properties" );
|
|
|
- Assert.assertEquals(result.get(13), "-Dyarn.app.container.log.dir=${yarn.log.dir}/userlogs/application_0/12345");
|
|
|
- Assert.assertEquals(result.get(14), "-Dyarn.app.container.log.filesize=0");
|
|
|
- Assert.assertEquals(result.get(15), "-Dhadoop.root.logger=INFO,CLA");
|
|
|
- Assert.assertEquals(result.get(16), "-Dhadoop.root.logfile=container-localizer-syslog");
|
|
|
- Assert.assertEquals(result.get(17),"org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer" );
|
|
|
- Assert.assertEquals(result.get(18), "test");
|
|
|
- Assert.assertEquals(result.get(19), "application_0");
|
|
|
- Assert.assertEquals(result.get(20),"12345" );
|
|
|
- Assert.assertEquals(result.get(21),"localhost" );
|
|
|
- Assert.assertEquals(result.get(22),"8040" );
|
|
|
+ Assert.assertEquals(result.get(3), "application_0");
|
|
|
+ Assert.assertEquals(result.get(4), "12345");
|
|
|
+ Assert.assertEquals(result.get(5), "/bin/nmPrivateCTokensPath");
|
|
|
+ Assert.assertEquals(result.get(9), "-classpath" );
|
|
|
+ Assert.assertEquals(result.get(12), "-Xmx256m" );
|
|
|
+ Assert.assertEquals(result.get(13),
|
|
|
+ "-Dlog4j.configuration=container-log4j.properties" );
|
|
|
+ Assert.assertEquals(result.get(14),
|
|
|
+ "-Dyarn.app.container.log.dir=${yarn.log.dir}/userlogs/application_0/12345");
|
|
|
+ Assert.assertEquals(result.get(15),
|
|
|
+ "-Dyarn.app.container.log.filesize=0");
|
|
|
+ Assert.assertEquals(result.get(16), "-Dhadoop.root.logger=INFO,CLA");
|
|
|
+ Assert.assertEquals(result.get(17),
|
|
|
+ "-Dhadoop.root.logfile=container-localizer-syslog");
|
|
|
+ Assert.assertEquals(result.get(18),
|
|
|
+ "org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer");
|
|
|
+ Assert.assertEquals(result.get(19), "test");
|
|
|
+ Assert.assertEquals(result.get(20), "application_0");
|
|
|
+ Assert.assertEquals(result.get(21), "12345");
|
|
|
+ Assert.assertEquals(result.get(22), "localhost");
|
|
|
+ Assert.assertEquals(result.get(23), "8040");
|
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
LOG.error("Error:"+e.getMessage(),e);
|