@Override public void reloadAll() throws IOException { logger.debug("Reloading execute_output from " + ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT); executableOutputDigestMap.clear(); NavigableSet<String> paths = store.listResources(ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT); if (paths != null) { for (String path : paths) { if (!isTaskExecutableOutput(resourceName(path))) reloadAt(path); } logger.debug("Loaded {} execute_output digest(s) out of {} resource", executableOutputDigestMap.size(), paths.size()); } }
@Override public ExecutableOutputPO reloadAt(String path) { try { ExecutableOutputPO executableOutputPO = readJobOutputResource(path); if (executableOutputPO == null) { logger.warn("No job output found at {}, returning null", path); executableOutputDigestMap.removeLocal(resourceName(path)); return null; } // create a digest ExecutableOutputPO digestExecutableOutputPO = new ExecutableOutputPO(); digestExecutableOutputPO.setUuid(executableOutputPO.getUuid()); digestExecutableOutputPO.setLastModified(executableOutputPO.getLastModified()); digestExecutableOutputPO.setStatus(executableOutputPO.getStatus()); executableOutputDigestMap.putLocal(resourceName(path), digestExecutableOutputPO); return digestExecutableOutputPO; } catch (Exception e) { throw new IllegalStateException("Error loading execute at " + path, e); } }
@Override public void reloadAll() throws IOException { logger.debug("Reloading execute_output from " + ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT); executableOutputDigestMap.clear(); NavigableSet<String> paths = store.listResources(ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT); if (paths != null) { for (String path : paths) { if (!isTaskExecutableOutput(resourceName(path))) reloadAt(path); } logger.debug("Loaded {} execute_output digest(s) out of {} resource", executableOutputDigestMap.size(), paths.size()); } }
@Override public ExecutableOutputPO reloadAt(String path) { try { ExecutableOutputPO executableOutputPO = readJobOutputResource(path); if (executableOutputPO == null) { logger.warn("No job output found at {}, returning null", path); executableOutputDigestMap.removeLocal(resourceName(path)); return null; } // create a digest ExecutableOutputPO digestExecutableOutputPO = new ExecutableOutputPO(); digestExecutableOutputPO.setUuid(executableOutputPO.getUuid()); digestExecutableOutputPO.setLastModified(executableOutputPO.getLastModified()); digestExecutableOutputPO.setStatus(executableOutputPO.getStatus()); executableOutputDigestMap.putLocal(resourceName(path), digestExecutableOutputPO); return digestExecutableOutputPO; } catch (Exception e) { throw new IllegalStateException("Error loading execute at " + path, e); } }