Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle submitted worker failure #726

Merged
merged 2 commits into from
Nov 14, 2024
Merged
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 @@ -288,7 +288,7 @@ private void onSubmittedScheduleRequestEvent(SubmittedScheduleRequestEvent event
try {
final TaskExecutorRegistration info = resourceCluster.getTaskExecutorInfo(taskExecutorID)
.join();
boolean success =
boolean success = //todo this return state is not wired to actual processing
jobMessageRouter.routeWorkerEvent(new WorkerLaunched(
event.getEvent().getRequest().getWorkerId(),
event.getEvent().getRequest().getStageNum(),
Expand All @@ -308,6 +308,7 @@ private void onSubmittedScheduleRequestEvent(SubmittedScheduleRequestEvent event
}
} catch (Exception ex) {
log.warn("Failed to route message due to error in getting TaskExecutor info: {}", taskExecutorID, ex);
self().tell(event.onFailure(ex), self());
}
}

Expand Down Expand Up @@ -520,6 +521,11 @@ private static class SubmittedScheduleRequestEvent {

ScheduleRequestEvent event;
TaskExecutorID taskExecutorID;

FailedToScheduleRequestEvent onFailure(Throwable throwable) {
return new FailedToScheduleRequestEvent(
this.event, 1, ExceptionUtils.stripCompletionException(throwable));
}
}

@Value
Expand Down
Loading