public ExecutableOutputPO getJobOutput(String uuid) throws PersistentException { ExecutableOutputPO result = null; try { result = readJobOutputResource(pathOfJobOutput(uuid)); if (result == null) { result = new ExecutableOutputPO(); result.setUuid(uuid); return result; } return result; } catch (IOException e) { logger.error("error get job output id:" + uuid, e); if (e.getCause() instanceof FileNotFoundException) { result = new ExecutableOutputPO(); result.setUuid(uuid); result.setStatus(ExecutableState.SUCCEED.name()); return result; } else { throw new PersistentException(e); } } }
public List<ExecutableOutputPO> getJobOutputs() throws PersistentException { try { ArrayList<String> resources = store.listResources(JOB_OUTPUT_ROOT); if (resources == null) { return Collections.emptyList(); } ArrayList<ExecutableOutputPO> result = new ArrayList<ExecutableOutputPO>(resources.size()); for (String path : resources) { result.add(readJobOutputResource(path)); } return result; } catch (IOException e) { logger.error("error get all Jobs:", e); throw new PersistentException(e); } }
public ExecutableOutputPO getJobOutput(String uuid) throws PersistentException { try { ExecutableOutputPO result = readJobOutputResource(pathOfJobOutput(uuid)); if (result == null) { result = new ExecutableOutputPO(); result.setUuid(uuid); return result; } return result; } catch (IOException e) { logger.error("error get job output id:" + uuid, e); throw new PersistentException(e); } }
public ExecutableOutputPO getJobOutput(String uuid) throws PersistentException { try { ExecutableOutputPO result = readJobOutputResource(pathOfJobOutput(uuid)); if (result == null) { result = new ExecutableOutputPO(); result.setUuid(uuid); return result; } return result; } catch (IOException e) { logger.error("error get job output id:" + uuid, e); throw new PersistentException(e); } }
public ExecutableOutputPO getJobOutput(String uuid) throws PersistentException { ExecutableOutputPO result = null; try { result = readJobOutputResource(pathOfJobOutput(uuid)); if (result == null) { result = new ExecutableOutputPO(); result.setUuid(uuid); return result; } return result; } catch (IOException e) { logger.error("error get job output id:" + uuid, e); if (e.getCause() instanceof FileNotFoundException) { result = new ExecutableOutputPO(); result.setUuid(uuid); result.setStatus(ExecutableState.SUCCEED.name()); return result; } else { throw new PersistentException(e); } } }