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)
this.slotMetrics = supervisor.getSlotMetrics(); this.launcher = ContainerLauncher.make(superConf, assignmentId, supervisorPort, supervisor.getSharedContext(), supervisor.getMetricsRegistry(), supervisor.getContainerMemoryTracker());
container = containerLauncher.recoverContainer(port, currentAssignment, localState); } else {
Container c = staticState.containerLauncher.launchContainer(staticState.port, dynamicState.pendingChangingBlobsAssignment, staticState.localState); return dynamicState
public void shutdownAllWorkers(UniFunc<Slot> onWarnTimeout, UniFunc<Slot> onErrorTimeout) { if (readState != null) { readState.shutdownAllWorkers(onWarnTimeout, onErrorTimeout); } else { try { ContainerLauncher launcher = ContainerLauncher.make(getConf(), getId(), getThriftServerPort(), getSharedContext(), getMetricsRegistry(), getContainerMemoryTracker()); killWorkers(SupervisorUtils.supervisorWorkerIds(conf), launcher); } catch (Exception e) { throw Utils.wrapInRuntime(e); } } }
container = containerLauncher.recoverContainer(port, currentAssignment, localState); } else {
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);
this.cachedAssignments = supervisor.getCurrAssignment(); this.launcher = ContainerLauncher.make(superConf, assignmentId, supervisor.getSharedContext());
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);
public void shutdownAllWorkers(UniFunc<Slot> onWarnTimeout, UniFunc<Slot> onErrorTimeout) { if (readState != null) { readState.shutdownAllWorkers(onWarnTimeout, onErrorTimeout); } else { try { ContainerLauncher launcher = ContainerLauncher.make(getConf(), getId(), getSharedContext()); killWorkers(SupervisorUtils.supervisorWorkerIds(conf), launcher); } catch (Exception e) { throw Utils.wrapInRuntime(e); } } }
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) {