You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2013/11/25 20:01:20 UTC
git commit: TEZ-640. Support infinite wait when trying to submit DAG
to a Session. (hitesh)
Updated Branches:
refs/heads/master 2f25ef6b8 -> 369de6033
TEZ-640. Support infinite wait when trying to submit DAG to a Session. (hitesh)
Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/369de603
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/369de603
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/369de603
Branch: refs/heads/master
Commit: 369de6033b0c128e5dc5899efc782bf7c5b695be
Parents: 2f25ef6
Author: Hitesh Shah <hi...@apache.org>
Authored: Mon Nov 25 11:00:54 2013 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Mon Nov 25 11:00:54 2013 -0800
----------------------------------------------------------------------
.../main/java/org/apache/tez/client/TezClientUtils.java | 3 ++-
.../src/main/java/org/apache/tez/client/TezSession.java | 10 +++-------
2 files changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/369de603/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
index c415f8a..0d90977 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java
@@ -607,7 +607,8 @@ public class TezClientUtils {
} catch (YarnException e) {
throw new TezException(e);
}
- return getAMProxy(conf, appReport.getHost(), appReport.getRpcPort(), appReport.getClientToAMToken());
+ return getAMProxy(conf, appReport.getHost(),
+ appReport.getRpcPort(), appReport.getClientToAMToken());
}
@Private
http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/369de603/tez-api/src/main/java/org/apache/tez/client/TezSession.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/TezSession.java b/tez-api/src/main/java/org/apache/tez/client/TezSession.java
index 5c8ab67..d9eba37 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezSession.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezSession.java
@@ -125,7 +125,7 @@ public class TezSession {
* @throws DAGSubmissionTimedOut if submission timed out
*/
public synchronized DAGClient submitDAG(DAG dag)
- throws TezException, IOException {
+ throws TezException, IOException, InterruptedException {
if (!sessionStarted) {
throw new SessionNotRunning("Session not started");
} else if (sessionStopped) {
@@ -167,12 +167,8 @@ public class TezSession {
if (proxy != null) {
break;
}
- try {
- Thread.sleep(100l);
- } catch (InterruptedException e) {
- // Ignore
- }
- if (System.currentTimeMillis() > endTime) {
+ Thread.sleep(100l);
+ if (timeout != -1 && System.currentTimeMillis() > endTime) {
try {
LOG.warn("DAG submission to session timed out, stopping session");
stop();