zhuzhurk commented on a change in pull request #9794: [FLINK-14247][runtime]
Use NoResourceAvailableException to wrap TimeoutException on slot allocation
timeout
URL: https://github.com/apache/flink/pull/9794#discussion_r329645418
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultScheduler.java
##########
@@ -362,12 +365,22 @@ private static void propagateIfNonNull(final Throwable
throwable) {
.registerProducedPartitions(logicalSlot.getTaskManagerLocation(),
sendScheduleOrUpdateConsumerMessage);
executionVertex.tryAssignResource(logicalSlot);
} else {
- handleTaskFailure(executionVertexId, throwable);
+ handleTaskFailure(executionVertexId,
maybeWrapWithNoResourceAvailableException(throwable));
}
return null;
};
}
+ private Throwable maybeWrapWithNoResourceAvailableException(final
Throwable failure) {
+ final Throwable strippedThrowable =
ExceptionUtils.stripCompletionException(failure);
+ if (strippedThrowable instanceof TimeoutException) {
+ return new NoResourceAvailableException("Could not
allocate the required slot within slot request timeout. " +
Review comment:
Ok. The cause is included.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services