You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2019/02/06 10:03:29 UTC
[flink] branch master updated: [FLINK-10944] Enhance error message
for slot allocation timeout
This is an automated email from the ASF dual-hosted git repository.
aljoscha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 46326ab [FLINK-10944] Enhance error message for slot allocation timeout
46326ab is described below
commit 46326ab9181acec53d1e9e7ec8f4a26c672fec31
Author: Aljoscha Krettek <al...@gmail.com>
AuthorDate: Tue Feb 5 14:40:47 2019 +0100
[FLINK-10944] Enhance error message for slot allocation timeout
---
.../runtime/executiongraph/ExecutionGraph.java | 27 +++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
index 64fa146..eb2af3d 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
@@ -1007,8 +1007,33 @@ public class ExecutionGraph implements AccessExecutionGraph {
if (strippedThrowable instanceof TimeoutException) {
int numTotal = allAllocationsFuture.getNumFuturesTotal();
int numComplete = allAllocationsFuture.getNumFuturesCompleted();
+
String message = "Could not allocate all requires slots within timeout of " +
- timeout + ". Slots required: " + numTotal + ", slots allocated: " + numComplete;
+ timeout + ". Slots required: " + numTotal + ", slots allocated: " + numComplete +
+ ", previous allocation IDs: " + allPreviousAllocationIds;
+
+ StringBuilder executionMessageBuilder = new StringBuilder();
+
+ for (int i = 0; i < allAllocationFutures.size(); i++) {
+ CompletableFuture<Execution> executionFuture = allAllocationFutures.get(i);
+
+ try {
+ Execution execution = executionFuture.getNow(null);
+ if (execution != null) {
+ executionMessageBuilder.append("completed: " + execution);
+ } else {
+ executionMessageBuilder.append("incomplete: " + executionFuture);
+ }
+ } catch (CompletionException completionException) {
+ executionMessageBuilder.append("completed exceptionally: " + completionException + "/" + executionFuture);
+ }
+
+ if (i < allAllocationFutures.size() - 1 ) {
+ executionMessageBuilder.append(", ");
+ }
+ }
+
+ message += ", execution status: " + executionMessageBuilder.toString();
resultThrowable = new NoResourceAvailableException(message);
} else {