Skip to content

Commit

Permalink
handle submitted failure (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andyz26 authored Nov 14, 2024
1 parent 4da2e05 commit 325d23d
Showing 1 changed file with 7 additions and 1 deletion.
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

0 comments on commit 325d23d

Please sign in to comment.