Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,19 @@ public static void main(String[] args) {
}
log.info("Shutdown hook completed.");
}));
log.info(
"OH_SCHED_START job_type={} numParallelJobs={} tasksWaitHours={} numJobsSubmitter={} "
+ "numJobsPoller={} taskPollIntervalMs={} taskQueuedTimeoutMs={} taskTimeoutMs={} "
+ "multiOperationMode={}",
operationType.getValue(),
getNumParallelJobs(cmdLine),
getTasksWaitHours(cmdLine),
getNumJobsSubmitter(cmdLine),
getNumJobsPoller(cmdLine),
getTaskPollIntervalMs(cmdLine),
getTaskQueuedTimeoutMs(cmdLine),
getTaskTimeoutMs(cmdLine),
isMultiOperationMode(cmdLine));
app.run(
operationType,
operationTaskCls.toString(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,24 @@ private Optional<JobState> submitJob(Attributes typeAttributes) {

protected Optional<JobState> pollJobStatus(Attributes typeAttributes) {
long startTime = System.currentTimeMillis();
Optional<JobState> lastObservedState = Optional.empty();
try {
Optional<JobState> jobState;
do {
jobState = jobsClient.getState(jobId);
lastObservedState = jobState;
long elapsedTime = System.currentTimeMillis() - startTime;
// Exit status check if a job is queued for more than queuedTimeoutMs.
if (elapsedTime > queuedTimeoutMs) {
if (jobState.isPresent() && jobState.get().equals(JobState.QUEUED)) {
String executionId =
jobsClient.getJob(jobId).map(JobResponseBody::getExecutionId).orElse(null);
log.info(
"Exiting status check for {} for {} due to queued timeout", getType(), metadata);
"Exiting status check for {} for {} due to queued timeout lastObservedState={} executionId={}",
getType(),
metadata,
lastObservedState.orElse(null),
executionId);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,10 @@ private void buildOperationTaskListInParallelInternal(
.doAfterTerminate(
() -> {
operationTaskManager.updateDataGenerationCompletion();
log.info(
"OH_SCHED_ELIGIBLE job_type={} count={}",
jobType,
operationTaskManager.getTotalDataCount());
log.info(
"The metadata fetched count: {} for the job type: {}",
operationTaskManager.getTotalDataCount(),
Expand Down Expand Up @@ -485,6 +489,10 @@ private void buildDataLayoutOperationTaskListInParallel(
.doAfterTerminate(
() -> {
operationTaskManager.updateDataGenerationCompletion();
log.info(
"OH_SCHED_ELIGIBLE job_type={} count={}",
jobType,
operationTaskManager.getTotalDataCount());
log.info(
"The metadata fetched count: {} for the job type: {}",
operationTaskManager.getTotalDataCount(),
Expand Down Expand Up @@ -516,6 +524,10 @@ private void buildDatabaseLevelOperationTasksInParallel(
.doAfterTerminate(
() -> {
operationTaskManager.updateDataGenerationCompletion();
log.info(
"OH_SCHED_ELIGIBLE job_type={} count={}",
jobType,
operationTaskManager.getTotalDataCount());
log.info(
"The metadata fetched count: {} for the job type: {}",
operationTaskManager.getTotalDataCount(),
Expand Down
Loading