|
@@ -29,6 +29,7 @@ import org.apache.hadoop.net.NetworkTopology;
|
|
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
|
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
|
|
import org.apache.hadoop.yarn.api.records.Priority;
|
|
|
+import org.apache.hadoop.yarn.api.records.QueueInfo;
|
|
|
import org.apache.hadoop.yarn.api.records.Resource;
|
|
|
import org.apache.hadoop.yarn.event.AsyncDispatcher;
|
|
|
import org.apache.hadoop.yarn.server.resourcemanager.Application;
|
|
@@ -74,6 +75,13 @@ public class TestFifoScheduler {
|
|
|
.getRMContext());
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ public void testFifoSchedulerCapacityWhenNoNMs() {
|
|
|
+ FifoScheduler scheduler = new FifoScheduler();
|
|
|
+ QueueInfo queueInfo = scheduler.getQueueInfo(null, false, false);
|
|
|
+ Assert.assertEquals(0.0f, queueInfo.getCurrentCapacity());
|
|
|
+ }
|
|
|
+
|
|
|
@Test
|
|
|
public void testAppAttemptMetrics() throws Exception {
|
|
|
AsyncDispatcher dispatcher = new InlineDispatcher();
|