@Override public void cancel() { LOG.info("Request to stop container {}.", container.getId()); try { nmClient.stopContainer(container.getId(), container.getNodeId()); while (true) { ContainerStatus status = nmClient.getContainerStatus(container.getId(), container.getNodeId()); LOG.trace("Container status: {} {}", status, status.getDiagnostics()); if (status.getState() == ContainerState.COMPLETE) { break; } Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS); } LOG.info("Container {} stopped.", container.getId()); } catch (Exception e) { LOG.error("Fail to stop container {}", container.getId(), e); throw Throwables.propagate(e); } } }
@Override public void cancel() { LOG.info("Request to stop container {}.", container.getId()); try { nmClient.stopContainer(container.getId(), container.getNodeId()); while (true) { ContainerStatus status = nmClient.getContainerStatus(container.getId(), container.getNodeId()); LOG.trace("Container status: {} {}", status, status.getDiagnostics()); if (status.getState() == ContainerState.COMPLETE) { break; } Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS); } LOG.info("Container {} stopped.", container.getId()); } catch (Exception e) { LOG.error("Fail to stop container {}", container.getId(), e); throw Throwables.propagate(e); } } }
if (event.getType() == ContainerEventType.QUERY_CONTAINER) { try { ContainerStatus containerStatus = client.getContainerStatus( containerId, event.getNodeId()); try {
if (event.getType() == ContainerEventType.QUERY_CONTAINER) { try { ContainerStatus containerStatus = client.getContainerStatus( containerId, event.getNodeId()); try {
if (event.getType() == ContainerEventType.QUERY_CONTAINER) { try { ContainerStatus containerStatus = client.getContainerStatus( containerId, event.getNodeId()); try {
if (event.getType() == ContainerEventType.QUERY_CONTAINER) { try { ContainerStatus containerStatus = client.getContainerStatus( containerId, event.getNodeId()); try {