You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/10/21 19:59:07 UTC
[flink] branch master updated: [FLINK-10527] Cleanup constant
isNewMode in YarnTestBase
This is an automated email from the ASF dual-hosted git repository.
trohrmann 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 7b040b9 [FLINK-10527] Cleanup constant isNewMode in YarnTestBase
7b040b9 is described below
commit 7b040b915504e59243c642b1f4a84c956d96d134
Author: yanghua <ya...@gmail.com>
AuthorDate: Sat Oct 20 00:09:08 2018 +0800
[FLINK-10527] Cleanup constant isNewMode in YarnTestBase
---
.../apache/flink/yarn/YARNSessionFIFOITCase.java | 36 ++++------------------
1 file changed, 6 insertions(+), 30 deletions(-)
diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
index f027399..fb2c6cc 100644
--- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
+++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
@@ -132,28 +132,6 @@ public class YARNSessionFIFOITCase extends YarnTestBase {
// before checking any strings outputted by the CLI, first give it time to return
clusterRunner.join();
- if (!isNewMode) {
- checkForLogString("The Flink YARN client has been started in detached mode");
-
- // in legacy mode we have to wait until the TMs are up until we can submit the job
- LOG.info("Waiting until two containers are running");
- // wait until two containers are running
- while (getRunningContainers() < 2) {
- sleep(500);
- }
-
- // additional sleep for the JM/TM to start and establish connection
- long startTime = System.nanoTime();
- while (System.nanoTime() - startTime < TimeUnit.NANOSECONDS.convert(10, TimeUnit.SECONDS) &&
- !(verifyStringsInNamedLogFiles(
- new String[]{"YARN Application Master started"}, "jobmanager.log") &&
- verifyStringsInNamedLogFiles(
- new String[]{"Starting TaskManager actor"}, "taskmanager.log"))) {
- LOG.info("Still waiting for JM/TM to initialize...");
- sleep(500);
- }
- }
-
// actually run a program, otherwise we wouldn't necessarily see any TaskManagers
// be brought up
Runner jobRunner = startWithArgs(new String[]{"run",
@@ -163,14 +141,12 @@ public class YARNSessionFIFOITCase extends YarnTestBase {
jobRunner.join();
- if (isNewMode) {
- // in "new" mode we can only wait after the job is submitted, because TMs
- // are spun up lazily
- LOG.info("Waiting until two containers are running");
- // wait until two containers are running
- while (getRunningContainers() < 2) {
- sleep(500);
- }
+ // in "new" mode we can only wait after the job is submitted, because TMs
+ // are spun up lazily
+ LOG.info("Waiting until two containers are running");
+ // wait until two containers are running
+ while (getRunningContainers() < 2) {
+ sleep(500);
}
// make sure we have two TMs running in either mode