@Override public void kill() throws IOException { ProcessSimulator.killProcess(_workerId); _isAlive = false; //Make sure the worker is down before we try to shoot any child processes super.kill(); }
@Override public void kill() throws IOException { LOG.info("Killing {}:{}", _supervisorId, _workerId); if (shutdownTimer == null) { shutdownTimer = shutdownDuration.time(); } try { Set<Long> pids = getAllPids(); for (Long pid : pids) { kill(pid); } } catch (IOException e) { numKillExceptions.mark(); throw e; } }
staticState.iSupervisor.killedWorker(staticState.port); dynamicState.container.kill();
verify(container).kill(); assertTrue(Time.currentTimeMillis() > 1000);
verify(cContainer).kill(); verify(localizer, never()).requestDownloadTopologyBlobs(null, port, cb); assertSame("pendingDownload not set properly", null, nextState.pendingDownload);
verify(cContainer).kill(); verify(localizer).requestDownloadTopologyBlobs(nAssignment, port, cb); assertSame("pendingDownload not set properly", blobFuture, nextState.pendingDownload);
@Override public void kill() throws IOException { LOG.info("Killing {}:{}", _supervisorId, _workerId); Set<Long> pids = getAllPids(); for (Long pid : pids) { kill(pid); } }
@Override public void kill() throws IOException { ProcessSimulator.killProcess(_workerId); _isAlive = false; //Make sure the worker is down before we try to shoot any child processes super.kill(); }
/** * Kill the current container and relaunch it. (Something odd happened) * PRECONDITION: container != null * @param dynamicState current state * @param staticState static data * @return the next state * @throws Exception */ static DynamicState killAndRelaunchContainer(DynamicState dynamicState, StaticState staticState) throws Exception { assert(dynamicState.container != null); dynamicState.container.kill(); Time.sleep(staticState.killSleepMs); //any stop profile actions that hadn't timed out yet, we should restart after the worker is running again. HashSet<TopoProfileAction> mod = new HashSet<>(dynamicState.profileActions); mod.addAll(dynamicState.pendingStopProfileActions); return dynamicState.withState(MachineState.KILL_AND_RELAUNCH).withProfileActions(mod, Collections.<TopoProfileAction> emptySet()); }
/** * Kill the current container and start downloading what the new assignment needs, if there is a new assignment * PRECONDITION: container != null * @param dynamicState current state * @param staticState static data * @return the next state * @throws Exception */ static DynamicState killContainerForChangedAssignment(DynamicState dynamicState, StaticState staticState) throws Exception { assert(dynamicState.container != null); staticState.iSupervisor.killedWorker(staticState.port); dynamicState.container.kill(); Future<Void> pendingDownload = null; if (dynamicState.newAssignment != null) { pendingDownload = staticState.localizer.requestDownloadBaseTopologyBlobs(dynamicState.newAssignment, staticState.port); } Time.sleep(staticState.killSleepMs); return dynamicState.withPendingLocalization(dynamicState.newAssignment, pendingDownload).withState(MachineState.KILL); }