|
@@ -86,8 +86,9 @@ public class TestNMWebServer {
|
|
}
|
|
}
|
|
|
|
|
|
private int startNMWebAppServer(String webAddr) {
|
|
private int startNMWebAppServer(String webAddr) {
|
|
|
|
+ Configuration conf = new Configuration();
|
|
Context nmContext = new NodeManager.NMContext(null, null, null, null,
|
|
Context nmContext = new NodeManager.NMContext(null, null, null, null,
|
|
- null, false, null);
|
|
|
|
|
|
+ null, false, conf);
|
|
ResourceView resourceView = new ResourceView() {
|
|
ResourceView resourceView = new ResourceView() {
|
|
@Override
|
|
@Override
|
|
public long getVmemAllocatedForContainers() {
|
|
public long getVmemAllocatedForContainers() {
|
|
@@ -110,7 +111,6 @@ public class TestNMWebServer {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- Configuration conf = new Configuration();
|
|
|
|
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
|
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
|
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
|
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
|
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
|
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
|
@@ -149,8 +149,9 @@ public class TestNMWebServer {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testNMWebApp() throws IOException, YarnException {
|
|
public void testNMWebApp() throws IOException, YarnException {
|
|
|
|
+ Configuration conf = new Configuration();
|
|
Context nmContext = new NodeManager.NMContext(null, null, null, null,
|
|
Context nmContext = new NodeManager.NMContext(null, null, null, null,
|
|
- null, false, null);
|
|
|
|
|
|
+ null, false, conf);
|
|
ResourceView resourceView = new ResourceView() {
|
|
ResourceView resourceView = new ResourceView() {
|
|
@Override
|
|
@Override
|
|
public long getVmemAllocatedForContainers() {
|
|
public long getVmemAllocatedForContainers() {
|
|
@@ -173,7 +174,6 @@ public class TestNMWebServer {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- Configuration conf = new Configuration();
|
|
|
|
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
|
conf.set(YarnConfiguration.NM_LOCAL_DIRS, testRootDir.getAbsolutePath());
|
|
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
|
conf.set(YarnConfiguration.NM_LOG_DIRS, testLogDir.getAbsolutePath());
|
|
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
|
NodeHealthCheckerService healthChecker = createNodeHealthCheckerService(conf);
|
|
@@ -218,8 +218,8 @@ public class TestNMWebServer {
|
|
Context context = mock(Context.class);
|
|
Context context = mock(Context.class);
|
|
Container container =
|
|
Container container =
|
|
new ContainerImpl(conf, dispatcher, launchContext,
|
|
new ContainerImpl(conf, dispatcher, launchContext,
|
|
- null, metrics,
|
|
|
|
- BuilderUtils.newContainerTokenIdentifier(containerToken), context) {
|
|
|
|
|
|
+ null, metrics, BuilderUtils.newContainerTokenIdentifier(
|
|
|
|
+ containerToken), context) {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public ContainerState getContainerState() {
|
|
public ContainerState getContainerState() {
|