You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2014/09/24 01:48:23 UTC
[3/3] git commit: [FLINK-1119] Make sure test mini cluster has
started properly before submitting the test job.
[FLINK-1119] Make sure test mini cluster has started properly before submitting the test job.
Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/68801f2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/68801f2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/68801f2d
Branch: refs/heads/master
Commit: 68801f2d153a18b7d0fab0238abfd6fbf1091a75
Parents: bd4197e
Author: Stephan Ewen <se...@apache.org>
Authored: Wed Sep 24 01:14:18 2014 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Wed Sep 24 01:14:18 2014 +0200
----------------------------------------------------------------------
.../apache/flink/client/minicluster/NepheleMiniCluster.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/68801f2d/flink-clients/src/main/java/org/apache/flink/client/minicluster/NepheleMiniCluster.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/minicluster/NepheleMiniCluster.java b/flink-clients/src/main/java/org/apache/flink/client/minicluster/NepheleMiniCluster.java
index e8c3f19..20ed5cc 100644
--- a/flink-clients/src/main/java/org/apache/flink/client/minicluster/NepheleMiniCluster.java
+++ b/flink-clients/src/main/java/org/apache/flink/client/minicluster/NepheleMiniCluster.java
@@ -50,7 +50,7 @@ public class NepheleMiniCluster {
private static final boolean DEFAULT_LAZY_MEMORY_ALLOCATION = true;
- private static final int DEFAULT_TASK_MANAGER_NUM_SLOTS = -1;
+ private static final int DEFAULT_TASK_MANAGER_NUM_SLOTS = 1;
// --------------------------------------------------------------------------------------------
@@ -244,6 +244,11 @@ public class NepheleMiniCluster {
// ------------------------------------------------------------------------
private void waitForJobManagerToBecomeReady(int numSlots) throws InterruptedException {
+ if (numSlots < 0) {
+ // may happen due to miss-configuration. wait at least till the first slot.
+ numSlots = 1;
+ }
+
while (jobManager.getNumberOfSlotsAvailableToScheduler() < numSlots) {
Thread.sleep(50);
}