Resource.newInstance(1024, 1), new String[] {"h1"}); allocator.sendRequest(event); TaskAttemptId attemptId = event.getAttemptID();
allocator.sendRequest(createRequest(jobId, 0, Resource.newInstance(1024, 1), locations, false, true)); allocator.sendRequest(createRequest(jobId, 0, Resource.newInstance(1024, 1), locations, true, false));
Resource.newInstance(1024, 1), new String[] {"h1"}); allocator.sendRequest(event1); Resource.newInstance(1024, 1), new String[] {"h1"}, true, false); allocator.sendRequest(event1f); Resource.newInstance(1024, 1), new String[] {"h1", "h3"}); allocator.sendRequest(event3);
Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event1); Resource.newInstance(2048, 1), new String[] {"h1", "h2"}); allocator.sendRequest(event2); Resource.newInstance(1000, 1), new String[]{"h1"}); allocator.sendRequest(event3); Resource.newInstance(2000, 1), new String[]{"h1", "h2"}); allocator.sendRequest(event4); Resource.newInstance(3000, 1), new String[]{"h1", "h2", "h3"}); allocator.sendRequest(event5);
Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event1); ContainerRequestEvent event2 = ContainerRequestCreator.createRequest(jobId, 2, Resource.newInstance(1024, 1), new String[]{"h2"}); allocator.sendRequest(event2); ContainerRequestEvent event3 = createRequest(jobId, 3, Resource.newInstance(1024, 1), new String[]{"h2"}, false, true); allocator.sendRequest(event3); createRequest(jobId, 4, Resource.newInstance(1024, 1), new String[]{"h3"}, false, true); allocator.sendRequest(event4);
Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event1); ContainerRequestEvent event2 = ContainerRequestCreator.createRequest(jobId, 2, Resource.newInstance(1024, 1), new String[]{"h2"}); allocator.sendRequest(event2); ContainerRequestEvent event3 = createRequest(jobId, 3, Resource.newInstance(1024, 1), new String[]{"h1"}, false, true); allocator.sendRequest(event3); createRequest(jobId, 4, Resource.newInstance(1024, 1), new String[] {"h3"}, false, true); allocator.sendRequest(event4); Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event5);
Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event1); ContainerRequestEvent event2 = ContainerRequestCreator.createRequest(jobId, 2, Resource.newInstance(1024, 1), new String[]{"h2"}); allocator.sendRequest(event2); ContainerRequestEvent event3 = createRequest(jobId, 3, Resource.newInstance(1024, 1), new String[]{"h2"}, false, true); allocator.sendRequest(event3); createRequest(jobId, 4, Resource.newInstance(1024, 1), new String[] {"h3"}, false, true); allocator.sendRequest(event4);
Resource.newInstance(1024, 1), new String[] {"h1"}); allocator.sendRequest(event1); Resource.newInstance(1024, 1), new String[] {"h2"}); allocator.sendRequest(event2); Resource.newInstance(1024, 1), new String[] {"h3"}); allocator.sendRequest(event3);
allocator.sendRequest(event1); allocator.sendRequest(event2); allocator.sendRequest(event3);
jobId, 1, Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event1); ContainerRequestEvent event2 = ContainerRequestCreator.createRequest( jobId, 2, Resource.newInstance(1024, 1), new String[]{"h1"}); allocator.sendRequest(event2); ContainerRequestEvent event3 = ContainerRequestCreator.createRequest( jobId, 3, Resource.newInstance(1024, 1), new String[]{"h2"}); allocator.sendRequest(event3);
Resource.newInstance(2048, 1), new String[] {"h1", "h2"}, true, false); allocator.sendRequest(event1); Resource.newInstance(3000, 1), new String[] {"h1"}, false, true); allocator.sendRequest(event2); Resource.newInstance(2048, 1), new String[] {"h3"}, false, false); allocator.sendRequest(event3);
jobId, 1, Resource.newInstance(1024, 1), new String[] {"h1"}); allocator.sendRequest(event1); jobId, 2, Resource.newInstance(1024, 1), new String[] {"h2"}); allocator.sendRequest(event2);
allocator.sendRequest(createRequest(jobId, 0, Resource.newInstance(1024, 1), locations, false, true)); nm.nodeHeartbeat(true); rm.drainEvents(); allocator.sendRequest(createRequest(jobId, 1, Resource.newInstance(1024, 1), locations, false, false));
private List<TaskAttemptContainerAssignedEvent> getContainerOnHost(JobId jobId, int taskAttemptId, int memory, String[] hosts, MockNM mockNM, MyContainerAllocator allocator, int expectedAdditions1, int expectedRemovals1, int expectedAdditions2, int expectedRemovals2, MyResourceManager rm) throws Exception { ContainerRequestEvent reqEvent = ContainerRequestCreator.createRequest(jobId, taskAttemptId, Resource.newInstance(memory, 1), hosts); allocator.sendRequest(reqEvent); // Send the request to the RM List<TaskAttemptContainerAssignedEvent> assigned = allocator.schedule(); rm.drainEvents(); assertBlacklistAdditionsAndRemovals( expectedAdditions1, expectedRemovals1, rm); Assert.assertEquals("No of assignments must be 0", 0, assigned.size()); // Heartbeat from the required nodeManager mockNM.nodeHeartbeat(true); rm.drainEvents(); assigned = allocator.schedule(); rm.drainEvents(); assertBlacklistAdditionsAndRemovals( expectedAdditions2, expectedRemovals2, rm); return assigned; }