public AbstractExecutable getJob(String uuid) { try { return parseTo(executableDao.getJob(uuid)); } catch (PersistentException e) { logger.error("fail to get job:" + uuid, e); throw new RuntimeException(e); } }
public void syncDigestsOfJob(String uuid) throws PersistentException { ExecutablePO job = getJob(uuid); ExecutablePO jobDigest = getJobDigest(uuid); if (job == null && jobDigest != null) { executableDigestMap.remove(uuid); } else if (job != null && jobDigest == null) { executableDigestMap.put(uuid, job); } ExecutableOutputPO jobOutput = getJobOutput(uuid); ExecutableOutputPO jobOutputDigest = getJobOutputDigest(uuid); if (jobOutput == null && jobOutputDigest != null) { executableOutputDigestMap.remove(uuid); } else if (jobOutput != null && jobOutputDigest == null) { executableOutputDigestMap.put(uuid, jobOutput); } } }
public void forceKillJob(String jobId) { try { final ExecutableOutputPO jobOutput = executableDao.getJobOutput(jobId); List<ExecutablePO> tasks = executableDao.getJob(jobId).getTasks(); for (ExecutablePO task : tasks) { if (executableDao.getJobOutput(task.getId()).getStatus().equals("SUCCEED")) { continue; } else if (executableDao.getJobOutput(task.getId()).getStatus().equals("RUNNING")) { updateJobOutput(task.getId(), ExecutableState.READY, Maps.<String, String> newHashMap(), ""); } break; } if (!jobOutput.getStatus().equals(ExecutableState.ERROR.toString())) { jobOutput.setStatus(ExecutableState.ERROR.toString()); executableDao.updateJobOutput(jobOutput); } } catch (PersistentException e) { throw new RuntimeException(e); } }
public void syncDigestsOfJob(String uuid) throws PersistentException { ExecutablePO job = getJob(uuid); ExecutablePO jobDigest = getJobDigest(uuid); if (job == null && jobDigest != null) { executableDigestMap.remove(uuid); } else if (job != null && jobDigest == null) { executableDigestMap.put(uuid, job); } ExecutableOutputPO jobOutput = getJobOutput(uuid); ExecutableOutputPO jobOutputDigest = getJobOutputDigest(uuid); if (jobOutput == null && jobOutputDigest != null) { executableOutputDigestMap.remove(uuid); } else if (jobOutput != null && jobOutputDigest == null) { executableOutputDigestMap.put(uuid, jobOutput); } } }
public void updateCheckpointJob(String jobId, List<AbstractExecutable> subTasksForCheck) { try { final ExecutablePO job = executableDao.getJob(jobId); Preconditions.checkArgument(job != null, "there is no related job for job id:" + jobId); List<ExecutablePO> tasksForCheck = Lists.newArrayListWithExpectedSize(subTasksForCheck.size()); for (AbstractExecutable taskForCheck : subTasksForCheck) { tasksForCheck.add(parse(taskForCheck)); } job.setTasksForCheck(tasksForCheck); executableDao.updateJob(job); } catch (PersistentException e) { logger.error("fail to update checkpoint job:" + jobId, e); throw new RuntimeException(e); } }
public void forceKillJob(String jobId) { try { final ExecutableOutputPO jobOutput = executableDao.getJobOutput(jobId); List<ExecutablePO> tasks = executableDao.getJob(jobId).getTasks(); for (ExecutablePO task : tasks) { if (executableDao.getJobOutput(task.getId()).getStatus().equals("SUCCEED")) { continue; } else if (executableDao.getJobOutput(task.getId()).getStatus().equals("RUNNING")) { updateJobOutput(task.getId(), ExecutableState.READY, Maps.<String, String> newHashMap(), ""); } break; } if (!jobOutput.getStatus().equals(ExecutableState.ERROR.toString())) { jobOutput.setStatus(ExecutableState.ERROR.toString()); executableDao.updateJobOutput(jobOutput); } } catch (PersistentException e) { throw new RuntimeException(e); } }
public void addJob(AbstractExecutable executable) { try { executable.initConfig(config); if (executableDao.getJob(executable.getId()) != null) { throw new IllegalArgumentException("job id:" + executable.getId() + " already exists"); } addJobOutput(executable); executableDao.addJob(parse(executable)); } catch (PersistentException e) { logger.error("fail to submit job:" + executable.getId(), e); throw new RuntimeException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
public ExecutablePO updateJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) == null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " does not exist"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error update job:" + job.getUuid(), e); throw new PersistentException(e); } }
ExecutablePO executablePO = executableDao.getJob(kylinJobId); addRequired(ResourceStore.EXECUTE_RESOURCE_ROOT + "/" + kylinJobId); addRequired(ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT + "/" + kylinJobId);
try { if (onlyJobOutput) { ExecutablePO executablePO = executableDao.getJob(lastJobId); addRequired(ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT + "/" + lastJobId); } else { ExecutablePO executablePO = executableDao.getJob(lastJobId); addRequired(ResourceStore.EXECUTE_RESOURCE_ROOT + "/" + lastJobId); addRequired(ResourceStore.EXECUTE_OUTPUT_RESOURCE_ROOT + "/" + lastJobId);
public AbstractExecutable getJob(String uuid) { try { return parseTo(executableDao.getJob(uuid)); } catch (PersistentException e) { logger.error("fail to get job:" + uuid, e); throw new RuntimeException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
public AbstractExecutable getJob(String uuid) { try { return parseTo(executableDao.getJob(uuid)); } catch (PersistentException e) { logger.error("fail to get job:" + uuid, e); throw new RuntimeException(e); } }
public AbstractExecutable getJob(String uuid) { try { return parseTo(executableDao.getJob(uuid)); } catch (PersistentException e) { logger.error("fail to get job:" + uuid, e); throw new RuntimeException(e); } }
public void updateCheckpointJob(String jobId, List<AbstractExecutable> subTasksForCheck) { try { final ExecutablePO job = executableDao.getJob(jobId); Preconditions.checkArgument(job != null, "there is no related job for job id:" + jobId); List<ExecutablePO> tasksForCheck = Lists.newArrayListWithExpectedSize(subTasksForCheck.size()); for (AbstractExecutable taskForCheck : subTasksForCheck) { tasksForCheck.add(parse(taskForCheck)); } job.setTasksForCheck(tasksForCheck); executableDao.updateJob(job); } catch (PersistentException e) { logger.error("fail to update checkpoint job:" + jobId, e); throw new RuntimeException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }
public void addJob(AbstractExecutable executable) { try { executable.initConfig(config); if (executableDao.getJob(executable.getId()) != null) { throw new IllegalArgumentException("job id:" + executable.getId() + " already exists"); } addJobOutput(executable); executableDao.addJob(parse(executable)); } catch (PersistentException e) { logger.error("fail to submit job:" + executable.getId(), e); throw new RuntimeException(e); } }
public ExecutablePO updateJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) == null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " does not exist"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error update job:" + job.getUuid(), e); throw new PersistentException(e); } }
public ExecutablePO addJob(ExecutablePO job) throws PersistentException { try { if (getJob(job.getUuid()) != null) { throw new IllegalArgumentException("job id:" + job.getUuid() + " already exists"); } writeJobResource(pathOfJob(job), job); executableDigestMap.put(job.getId(), job); return job; } catch (IOException e) { logger.error("error save job:" + job.getUuid(), e); throw new PersistentException(e); } }