use of org.apache.gobblin.commit.CommitSequenceStore in project incubator-gobblin by apache.
the class AbstractJobLauncher method executeUnfinishedCommitSequences.
private void executeUnfinishedCommitSequences(String jobName) throws IOException {
Preconditions.checkState(this.jobContext.getCommitSequenceStore().isPresent());
CommitSequenceStore commitSequenceStore = this.jobContext.getCommitSequenceStore().get();
for (String datasetUrn : commitSequenceStore.get(jobName)) {
Optional<CommitSequence> commitSequence = commitSequenceStore.get(jobName, datasetUrn);
if (commitSequence.isPresent()) {
commitSequence.get().execute();
}
commitSequenceStore.delete(jobName, datasetUrn);
}
}
Aggregations