private void removeContainerIfDone(ContainerId id) { Container c = containers.get(id); if(c != null && c.isCompletelyDone()) { containers.remove(id); } }
private void shutdownAllContainers() { for (Container ct : this.containers.values()) { if (ct != null) { ct.kill(); } } }
private void setupCryptoMaterial(StartContainersRequest request, String user) throws IOException { Path kStorePath = Paths.get(HopsSSLSocketFactory.LOCALIZED_KEYSTORE_FILE_NAME); Path tStorePath = Paths.get(HopsSSLSocketFactory.LOCALIZED_TRUSTSTORE_FILE_NAME); Path passwdPath = Paths.get(HopsSSLSocketFactory.LOCALIZED_PASSWD_FILE_NAME); byte[] keyStoreBin = Files.readAllBytes(kStorePath); ByteBuffer kStore = ByteBuffer.wrap(keyStoreBin); ByteBuffer tStore = ByteBuffer.wrap(Files.readAllBytes(tStorePath)); String password = readCryptoMaterialPassword(passwdPath.toFile()); request.setKeyStore(kStore); request.setKeyStorePassword(password); request.setTrustStore(tStore); request.setTrustStorePassword(password); }
CommonConfigurationKeysPublic.IPC_SERVER_SSL_ENABLED_DEFAULT)) { String user = UserGroupInformation.getCurrentUser().getUserName(); setupCryptoMaterial(requestList, user);
} else if (!isCompletelyDone()) { LOG.info("KILLING " + taskAttemptID);
} else if (!isCompletelyDone()) { LOG.info("KILLING " + taskAttemptID);
} else if (!isCompletelyDone()) { LOG.info("KILLING " + taskAttemptID);
@Override public void run() { LOG.info("Processing the event " + event.toString()); // Load ContainerManager tokens before creating a connection. // TODO: Do it only once per NodeManager. ContainerId containerID = event.getContainerID(); Container c = getContainer(event); switch(event.getType()) { case CONTAINER_REMOTE_LAUNCH: ContainerRemoteLaunchEvent launchEvent = (ContainerRemoteLaunchEvent) event; c.launch(launchEvent); break; case CONTAINER_REMOTE_CLEANUP: c.kill(event.getDumpContainerThreads()); break; case CONTAINER_COMPLETED: c.done(); break; } removeContainerIfDone(containerID); } }
@Override public void run() { LOG.info("Processing the event " + event.toString()); // Load ContainerManager tokens before creating a connection. // TODO: Do it only once per NodeManager. ContainerId containerID = event.getContainerID(); Container c = getContainer(event); switch(event.getType()) { case CONTAINER_REMOTE_LAUNCH: ContainerRemoteLaunchEvent launchEvent = (ContainerRemoteLaunchEvent) event; c.launch(launchEvent); break; case CONTAINER_REMOTE_CLEANUP: c.kill(event.getDumpContainerThreads()); break; case CONTAINER_COMPLETED: c.done(); break; } removeContainerIfDone(containerID); } }
@Override public void run() { LOG.info("Processing the event " + event.toString()); // Load ContainerManager tokens before creating a connection. // TODO: Do it only once per NodeManager. ContainerId containerID = event.getContainerID(); Container c = getContainer(event); switch(event.getType()) { case CONTAINER_REMOTE_LAUNCH: ContainerRemoteLaunchEvent launchEvent = (ContainerRemoteLaunchEvent) event; c.launch(launchEvent); break; case CONTAINER_REMOTE_CLEANUP: c.kill(); break; } removeContainerIfDone(containerID); } }
public void kill() { kill(false); }
private Container getContainer(ContainerLauncherEvent event) { ContainerId id = event.getContainerID(); Container c = containers.get(id); if(c == null) { c = new Container(event.getTaskAttemptID(), event.getContainerID(), event.getContainerMgrAddress()); Container old = containers.putIfAbsent(id, c); if(old != null) { c = old; } } return c; }
public void kill() { kill(false); }
private Container getContainer(ContainerLauncherEvent event) { ContainerId id = event.getContainerID(); Container c = containers.get(id); if(c == null) { c = new Container(event.getTaskAttemptID(), event.getContainerID(), event.getContainerMgrAddress()); Container old = containers.putIfAbsent(id, c); if(old != null) { c = old; } } return c; }
private Container getContainer(ContainerLauncherEvent event) { ContainerId id = event.getContainerID(); Container c = containers.get(id); if(c == null) { c = new Container(event.getTaskAttemptID(), event.getContainerID(), event.getContainerMgrAddress()); Container old = containers.putIfAbsent(id, c); if(old != null) { c = old; } } return c; }
private void removeContainerIfDone(ContainerId id) { Container c = containers.get(id); if(c != null && c.isCompletelyDone()) { containers.remove(id); } }
private void removeContainerIfDone(ContainerId id) { Container c = containers.get(id); if(c != null && c.isCompletelyDone()) { containers.remove(id); } }
private void shutdownAllContainers() { for (Container ct : this.containers.values()) { if (ct != null) { ct.kill(); } } }
private void shutdownAllContainers() { for (Container ct : this.containers.values()) { if (ct != null) { ct.kill(); } } }