|
@@ -101,6 +101,7 @@ import org.mockito.stubbing.Answer;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Lists;
|
|
import com.google.common.collect.Maps;
|
|
import com.google.common.collect.Maps;
|
|
|
|
+import com.google.common.collect.Sets;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Testing applications being retired from RM.
|
|
* Testing applications being retired from RM.
|
|
@@ -831,6 +832,7 @@ public class TestAppManager{
|
|
when(app.getApplicationType()).thenReturn("MAPREDUCE");
|
|
when(app.getApplicationType()).thenReturn("MAPREDUCE");
|
|
when(app.getSubmitTime()).thenReturn(1000L);
|
|
when(app.getSubmitTime()).thenReturn(1000L);
|
|
when(app.getLaunchTime()).thenReturn(2000L);
|
|
when(app.getLaunchTime()).thenReturn(2000L);
|
|
|
|
+ when(app.getApplicationTags()).thenReturn(Sets.newHashSet("tag2", "tag1"));
|
|
Map<String, Long> resourceSecondsMap = new HashMap<>();
|
|
Map<String, Long> resourceSecondsMap = new HashMap<>();
|
|
resourceSecondsMap.put(ResourceInformation.MEMORY_MB.getName(), 16384L);
|
|
resourceSecondsMap.put(ResourceInformation.MEMORY_MB.getName(), 16384L);
|
|
resourceSecondsMap.put(ResourceInformation.VCORES.getName(), 64L);
|
|
resourceSecondsMap.put(ResourceInformation.VCORES.getName(), 64L);
|
|
@@ -858,6 +860,7 @@ public class TestAppManager{
|
|
Assert.assertTrue(msg.contains("preemptedNonAMContainers=10"));
|
|
Assert.assertTrue(msg.contains("preemptedNonAMContainers=10"));
|
|
Assert.assertTrue(msg.contains("preemptedResources=<memory:1234\\, vCores:56>"));
|
|
Assert.assertTrue(msg.contains("preemptedResources=<memory:1234\\, vCores:56>"));
|
|
Assert.assertTrue(msg.contains("applicationType=MAPREDUCE"));
|
|
Assert.assertTrue(msg.contains("applicationType=MAPREDUCE"));
|
|
|
|
+ Assert.assertTrue(msg.contains("applicationTags=tag1\\,tag2"));
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|