tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-2195. TestTezJobs::testInvalidQueueSubmission/testInvalidQueueSubmissionToSession fail with hadoop branch-2. (hitesh)
Date Thu, 12 Mar 2015 23:17:30 GMT
Repository: tez
Updated Branches:
  refs/heads/master 63e985dfc -> 55d7fce06


TEZ-2195. TestTezJobs::testInvalidQueueSubmission/testInvalidQueueSubmissionToSession fail
with hadoop branch-2. (hitesh)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/55d7fce0
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/55d7fce0
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/55d7fce0

Branch: refs/heads/master
Commit: 55d7fce0608506543eb6bbf53177b16c7f017e5b
Parents: 63e985d
Author: Hitesh Shah <hitesh@apache.org>
Authored: Thu Mar 12 16:17:41 2015 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Thu Mar 12 16:17:41 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                  | 2 ++
 .../src/main/java/org/apache/tez/client/FrameworkClient.java | 4 +++-
 .../src/main/java/org/apache/tez/client/TezYarnClient.java   | 8 ++++++--
 tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java | 8 ++++----
 4 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/55d7fce0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 207502b..58f863b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,8 @@ Release 0.7.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2195. TestTezJobs::testInvalidQueueSubmission/testInvalidQueueSubmissionToSession
+    fail with hadoop branch-2.
   TEZ-1827. MiniTezCluster takes 10 minutes to shut down.
   TEZ-2178. YARN-3122 breaks tez compilation with hadoop 2.7.0.
   TEZ-2174. Make task priority available to TaskAttemptListener.

http://git-wip-us.apache.org/repos/asf/tez/blob/55d7fce0/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java b/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
index 528987f..e1c7d00 100644
--- a/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
+++ b/tez-api/src/main/java/org/apache/tez/client/FrameworkClient.java
@@ -30,6 +30,7 @@ import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.tez.common.ReflectionUtils;
 import org.apache.tez.dag.api.TezConfiguration;
+import org.apache.tez.dag.api.TezException;
 
 @Private
 public abstract class FrameworkClient {
@@ -64,7 +65,8 @@ public abstract class FrameworkClient {
 
   public abstract YarnClientApplication createApplication() throws YarnException, IOException;
 
-  public abstract ApplicationId submitApplication(ApplicationSubmissionContext appSubmissionContext)
throws YarnException, IOException;
+  public abstract ApplicationId submitApplication(ApplicationSubmissionContext appSubmissionContext)
+      throws YarnException, IOException, TezException;
 
   public abstract void killApplication(ApplicationId appId) throws YarnException, IOException;
 

http://git-wip-us.apache.org/repos/asf/tez/blob/55d7fce0/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java b/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
index eae1909..241e15c 100644
--- a/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
+++ b/tez-api/src/main/java/org/apache/tez/client/TezYarnClient.java
@@ -30,6 +30,7 @@ import org.apache.hadoop.yarn.client.api.YarnClientApplication;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.tez.dag.api.TezConfiguration;
+import org.apache.tez.dag.api.TezException;
 
 @Private
 public class TezYarnClient extends FrameworkClient {
@@ -66,11 +67,14 @@ public class TezYarnClient extends FrameworkClient {
   }
 
   @Override
-  public ApplicationId submitApplication(ApplicationSubmissionContext appSubmissionContext)
throws YarnException, IOException {
+  public ApplicationId submitApplication(ApplicationSubmissionContext appSubmissionContext)
+      throws YarnException, IOException, TezException {
 	ApplicationId appId= yarnClient.submitApplication(appSubmissionContext);
     ApplicationReport appReport = getApplicationReport(appId);
     if (appReport.getYarnApplicationState() == YarnApplicationState.FAILED){
-      throw new IOException("Failed to submit application to YARN: " + appReport.getDiagnostics());
+      throw new TezException("Failed to submit application to YARN"
+          + ", applicationId=" + appId
+          + ", diagnostics=" + appReport.getDiagnostics());
     }
     return appId;
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/55d7fce0/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
----------------------------------------------------------------------
diff --git a/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java b/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
index b2c9044..407af45 100644
--- a/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
+++ b/tez-tests/src/test/java/org/apache/tez/test/TestTezJobs.java
@@ -698,8 +698,8 @@ public class TestTezJobs {
       int result = job.run(tezConf, new String[] { StringUtils.join(",", inputPaths),
           StringUtils.join(",", outputPaths), "2" }, null);
       Assert.assertTrue("Job should have failed", result != 0);
-    } catch (IOException e) {
-      Assert.assertTrue(e.getMessage().contains("Failed to submit application to YARN"));
+    } catch (TezException e) {
+      Assert.assertTrue(e.getMessage().contains("Failed to submit application"));
     } finally {
       if (yarnClient != null) {
         yarnClient.stop();
@@ -735,8 +735,8 @@ public class TestTezJobs {
     } catch (SessionNotRunning e) {
       // Expected
       LOG.info("Session not running", e);
-    } catch (IOException e) {
-      Assert.assertTrue(e.getMessage().contains("Failed to submit application to YARN"));
+    } catch (TezException e) {
+      Assert.assertTrue(e.getMessage().contains("Failed to submit application"));
     } finally {
       if (yarnClient != null) {
         yarnClient.stop();


Mime
View raw message