/** * Clean up container's files for container relaunch or cleanup. */ protected void cleanupContainerFiles(Path containerWorkDir) { LOG.debug("cleanup container {} files", containerWorkDir); // delete ContainerScriptPath deleteAsUser(new Path(containerWorkDir, CONTAINER_SCRIPT)); // delete TokensPath deleteAsUser(new Path(containerWorkDir, FINAL_CONTAINER_TOKENS_FILE)); // delete symlinks because launch script will create symlinks again try { exec.cleanupBeforeRelaunch(container); } catch (IOException | InterruptedException e) { LOG.warn("{} exec failed to cleanup", container.getContainerId(), e); } }