sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cheol...@apache.org
Subject git commit: SQOOP-852: Mapreduce submission engine is not closing opened JobClient object
Date Wed, 30 Jan 2013 23:48:56 GMT
Updated Branches:
  refs/heads/sqoop2 554e5aeff -> 42b7979f5


SQOOP-852: Mapreduce submission engine is not closing opened JobClient object

(Jarcec Cecho via Cheolsoo Park)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/42b7979f
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/42b7979f
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/42b7979f

Branch: refs/heads/sqoop2
Commit: 42b7979f5e2c325ba8b02e1a309f0d1d60550c59
Parents: 554e5ae
Author: Cheolsoo Park <cheolsoo@apache.org>
Authored: Wed Jan 30 15:48:22 2013 -0800
Committer: Cheolsoo Park <cheolsoo@apache.org>
Committed: Wed Jan 30 15:48:22 2013 -0800

----------------------------------------------------------------------
 .../mapreduce/MapreduceSubmissionEngine.java       |    7 +++++++
 .../mapreduce/MapreduceSubmissionError.java        |    2 ++
 2 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/42b7979f/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
----------------------------------------------------------------------
diff --git a/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
b/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
index 1a144d0..bcd8124 100644
--- a/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
+++ b/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
@@ -115,6 +115,13 @@ public class MapreduceSubmissionEngine extends SubmissionEngine {
   @Override
   public void destroy() {
     LOG.info("Destroying Mapreduce Submission Engine");
+
+    // Closing job client
+    try {
+      jobClient.close();
+    } catch (IOException e) {
+      throw new SqoopException(MapreduceSubmissionError.MAPREDUCE_0005, e);
+    }
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/sqoop/blob/42b7979f/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java
----------------------------------------------------------------------
diff --git a/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java
b/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java
index 9296717..4af95b0 100644
--- a/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java
+++ b/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionError.java
@@ -32,6 +32,8 @@ public enum MapreduceSubmissionError implements ErrorCode {
 
   MAPREDUCE_0004("Unknown map reduce job status"),
 
+  MAPREDUCE_0005("Failure on submission engine destroy"),
+
   ;
 
   private final String message;


Mime
View raw message