You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by su...@apache.org on 2019/02/25 10:00:21 UTC
[hadoop] branch branch-3.0 updated: YARN-9168. DistributedShell
client timeout should be -1 by default. Contributed by Zhankun Tang.
This is an automated email from the ASF dual-hosted git repository.
sunilg pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new c139fe7 YARN-9168. DistributedShell client timeout should be -1 by default. Contributed by Zhankun Tang.
c139fe7 is described below
commit c139fe7a37ede2f963e11270d5edce03555bf2e7
Author: Sunil G <su...@apache.org>
AuthorDate: Mon Feb 25 15:28:45 2019 +0530
YARN-9168. DistributedShell client timeout should be -1 by default. Contributed by Zhankun Tang.
(cherry picked from commit 6cec90653dc2ae60a10262745997ea91dd872a8b)
---
.../hadoop/yarn/applications/distributedshell/Client.java | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java
index fd04997..70dd546 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java
@@ -880,14 +880,17 @@ public class Client {
+ " YarnState=" + state.toString() + ", DSFinalStatus=" + dsStatus.toString()
+ ". Breaking monitoring loop");
return false;
- }
+ }
- if (System.currentTimeMillis() > (clientStartTime + clientTimeout)) {
- LOG.info("Reached client specified timeout for application. Killing application");
+ // The value equal or less than 0 means no timeout
+ if (clientTimeout > 0
+ && System.currentTimeMillis() > (clientStartTime + clientTimeout)) {
+ LOG.info("Reached client specified timeout for application. " +
+ "Killing application");
forceKillApplication(appId);
- return false;
+ return false;
}
- }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org