Skip to content

Commit 8bec6ba

Browse files
Job scheduler fix related to status check (linkedin#332)
## Summary <!--- HINT: Replace #nnn with corresponding Issue number, if you are fixing an existing issue --> [Issue](https://github.com/linkedin/openhouse/issues/#nnn)] Briefly discuss the summary of the changes made in this pull request in 2-3 lines. There is a slight delay in getting the submitted job id and hence last few submitted jobs might not available in the submitted queue if the completed flag is marked before submission completion (until all future get completed). Moved job submission completion flag (after future get is done for all the submitted jobs) so that all the jobs are added in the queue for job status check. ## Changes - [ ] Client-facing API Changes - [ ] Internal API Changes - [x] Bug Fixes - [ ] New Features - [ ] Performance Improvements - [ ] Code Style - [ ] Refactoring - [ ] Documentation - [ ] Tests For all the boxes checked, please include additional details of the changes made in this pull request. ## Testing Done Local builds passed and verified exiting tests. <!--- Check any relevant boxes with "x" --> - [ ] Manually Tested on local docker setup. Please include commands ran, and their output. - [ ] Added new tests for the changes made. - [ ] Updated existing tests to reflect the changes made. - [ ] No tests added or updated. Please explain why. If unsure, please feel free to ask for help. - [x] Some other form of testing like staging or soak time in production. Please explain. For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request. # Additional Information - [ ] Breaking Changes - [ ] Deprecations - [ ] Large PR broken into smaller PRs, and PR plan linked in the description. For all the boxes checked, include additional details of the changes made in this pull request.
1 parent 97feb7c commit 8bec6ba

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/spark/src/main/java/com/linkedin/openhouse/jobs/scheduler/JobsScheduler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ private void submitLaunchJobTasks(
762762
})
763763
.thenRun(
764764
() -> {
765-
jobInfoManager.updateDataGenerationCompletion();
766765
log.info(
767766
"The total jobs submitted: {} for the job type: {}", taskList.size(), jobType);
768767
// get job status from task future and update job state for SUBMIT mode
@@ -774,6 +773,10 @@ private void submitLaunchJobTasks(
774773
startTimeMillis,
775774
tasksWaitHours,
776775
true);
776+
// Marked as completed after submission status check to ensure that all the submitted
777+
// jobs are added to
778+
// the submitted queue
779+
jobInfoManager.updateDataGenerationCompletion();
777780
});
778781
}
779782

0 commit comments

Comments
 (0)