You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by fa...@apache.org on 2023/03/24 08:32:17 UTC
[flink] branch master updated: [hotfix] Revert some unexpected changes of FLINK-31230. (#22260)
This is an automated email from the ASF dual-hosted git repository.
fanrui 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 60f3b2b32b5 [hotfix] Revert some unexpected changes of FLINK-31230. (#22260)
60f3b2b32b5 is described below
commit 60f3b2b32b593bf74a90015765817b3bf9c95d54
Author: Weihua Hu <hu...@gmail.com>
AuthorDate: Fri Mar 24 16:32:02 2023 +0800
[hotfix] Revert some unexpected changes of FLINK-31230. (#22260)
---
.../main/java/org/apache/flink/yarn/YarnClusterDescriptor.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
index 8231fd6fa59..965c608e38d 100644
--- a/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
+++ b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
@@ -846,7 +846,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
final ApplicationId appId = appContext.getApplicationId();
- // ------------------ Add Zookeeper namespace to local flinkConfiguraton ------
+ // ------------------ Add Zookeeper namespace to local flinkConfiguration ------
setHAClusterIdIfNotSet(configuration, appId);
if (HighAvailabilityMode.isHighAvailabilityModeActivated(configuration)) {
@@ -1231,6 +1231,7 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
LOG.info("Waiting for the cluster to be allocated");
final long startTime = System.currentTimeMillis();
+ long lastLogTime = System.currentTimeMillis();
ApplicationReport report;
YarnApplicationState lastAppState = YarnApplicationState.NEW;
loop:
@@ -1266,9 +1267,11 @@ public class YarnClusterDescriptor implements ClusterDescriptor<ApplicationId> {
if (appState != lastAppState) {
LOG.info("Deploying cluster, current state " + appState);
}
- if (System.currentTimeMillis() - startTime > 60000) {
+ if (System.currentTimeMillis() - lastLogTime > 60000) {
+ lastLogTime = System.currentTimeMillis();
LOG.info(
- "Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster");
+ "Deployment took more than {} seconds. Please check if the requested resources are available in the YARN cluster",
+ (lastLogTime - startTime) / 1000);
}
}
lastAppState = appState;