GJL 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_r329583234
##########
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:
`return new NoResourceAvailableException("...", failure);` ?
----------------------------------------------------------------
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