@Override public String getJobId() { return wrapped.getJobId(); }
@Override public String getJobId() { return wrapped.getJobId(); }
@Override public void checkpoint(AdminCommandContext context, Serializable data) throws IOException { checkpoint((AdminCommand) null, context); if (data != null) { checkpointAttachement(context.getJobId(), CHECKPOINT_MAINDATA, data); } }
@Override public void checkpoint(AdminCommand command, AdminCommandContext context) throws IOException { if (!StringUtils.ok(context.getJobId())) { throw new IllegalArgumentException("Command is not managed"); } Job job = get(context.getJobId()); if (job.getJobsFile() == null) { job.setJobsFile(getJobsFile()); } Checkpoint chkp = new Checkpoint(job, command, context); checkpointHelper.save(chkp); if (job instanceof AdminCommandInstanceImpl) { ((AdminCommandInstanceImpl) job).setState(AdminCommandState.State.RUNNING_RETRYABLE); } }