staticState.slotMetrics.numWorkersLaunched.mark(); Container c = staticState.containerLauncher.launchContainer(staticState.port, dynamicState.pendingLocalization, staticState.localState); return dynamicState .withCurrentAssignment(c, dynamicState.pendingLocalization).withState(MachineState.WAITING_FOR_WORKER_START)
Container c = staticState.containerLauncher.launchContainer(staticState.port, dynamicState.pendingChangingBlobsAssignment, staticState.localState); return dynamicState
LocalState state = mock(LocalState.class); ContainerLauncher containerLauncher = mock(ContainerLauncher.class); when(containerLauncher.launchContainer(port, newAssignment, state)).thenReturn(container); LSWorkerHeartbeat hb = mkWorkerHB(topoId, port, execList, Time.currentTimeSecs()); when(container.readHeartbeat()).thenReturn(hb, hb); verify(containerLauncher).launchContainer(port, newAssignment, state); assertEquals(MachineState.WAITING_FOR_WORKER_START, nextState.state); assertSame("pendingDownload is not null", null, nextState.pendingDownload);
LocalState state = mock(LocalState.class); ContainerLauncher containerLauncher = mock(ContainerLauncher.class); when(containerLauncher.launchContainer(port, nAssignment, state)).thenReturn(nContainer); LSWorkerHeartbeat nhb = mkWorkerHB(nTopoId, 100, nExecList, Time.currentTimeSecs()); when(nContainer.readHeartbeat()).thenReturn(nhb, nhb); verify(containerLauncher).launchContainer(port, nAssignment, state); assertEquals(MachineState.WAITING_FOR_WORKER_START, nextState.state); assertSame("pendingDownload is not null", null, nextState.pendingDownload);
return prepareForNewAssignmentNoWorkersRunning(dynamicState, staticState); Container c = staticState.containerLauncher.launchContainer(staticState.port, dynamicState.pendingLocalization, staticState.localState); return dynamicState.withCurrentAssignment(c, dynamicState.pendingLocalization).withState(MachineState.WAITING_FOR_WORKER_START).withPendingLocalization(null, null); } catch (TimeoutException e) {