tillrohrmann commented on a change in pull request #16523:
URL: https://github.com/apache/flink/pull/16523#discussion_r673212126



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/Execution.java
##########
@@ -1435,8 +1437,18 @@ private boolean transitionState(
                         getAttemptId(),
                         currentState,
                         targetState);
-            } else {
-                if (LOG.isInfoEnabled()) {
+            } else if (LOG.isInfoEnabled()) {
+                Optional<NoResourceAvailableException> noResourceException =
+                        findThrowable(error, 
NoResourceAvailableException.class);
+                if (noResourceException.isPresent()) {
+                    LOG.info(
+                            "{} ({}) switched from {} to {}",
+                            getVertex().getTaskNameWithSubtaskIndex(),
+                            getAttemptId(),
+                            currentState,
+                            targetState,
+                            noResourceException.get());
+                } else {

Review comment:
       I think this part should not longer be necessary with this change.

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
##########
@@ -354,7 +354,7 @@ private void 
failPendingRequests(Collection<ResourceRequirement> acquiredResourc
                     getSlotServiceStatus());
             cancelPendingRequests(
                     predicate,
-                    new NoResourceAvailableException(
+                    NoResourceAvailableException.withoutStackTrace(

Review comment:
       Actually, `withoutStackTrace()` makes it a bit more explicit compared to 
the sub class approach.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to