This is an automated email from the ASF dual-hosted git repository.
roman pushed a commit to branch release-1.13
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.13 by this push:
new bfb55d9 [hotfix] Avoid excessive logging in DeclarativeSlotPoolBridge
bfb55d9 is described below
commit bfb55d9c8de63883044529bd99abb69449327b41
Author: Roman Khachatryan <[email protected]>
AuthorDate: Wed Jul 14 09:56:45 2021 +0200
[hotfix] Avoid excessive logging in DeclarativeSlotPoolBridge
---
.../slotpool/DeclarativeSlotPoolBridge.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
index c9dafd2..07cb6b5 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
@@ -352,17 +352,17 @@ public class DeclarativeSlotPoolBridge extends
DeclarativeSlotPoolService implem
}
private void failPendingRequests(Collection<ResourceRequirement>
acquiredResources) {
- if (!pendingRequests.isEmpty()) {
- final NoResourceAvailableException cause =
- new NoResourceAvailableException(
- "Could not acquire the minimum required resources.
Acquired: "
- + acquiredResources
- + ". Current slot pool status: "
- + getSlotServiceStatus());
-
+ Predicate<PendingRequest> predicate =
+ request -> !isBatchSlotRequestTimeoutCheckDisabled ||
!request.isBatchRequest();
+ if (pendingRequests.values().stream().anyMatch(predicate)) {
+ log.warn(
+ "Could not acquire the minimum required resources, failing
slot requests. Acquired: {}. Current slot pool status: {}",
+ acquiredResources,
+ getSlotServiceStatus());
cancelPendingRequests(
- request -> !isBatchSlotRequestTimeoutCheckDisabled ||
!request.isBatchRequest(),
- cause);
+ predicate,
+ new NoResourceAvailableException(
+ "Could not acquire the minimum required
resources."));
}
}