sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject git commit: SQOOP-696 Throw exception for execution of non-existing job (Jarek Jarcec Cecho)
Date Sat, 08 Dec 2012 03:27:07 GMT
Updated Branches:
  refs/heads/sqoop2 e736e4dd4 -> b16ca584f


SQOOP-696 Throw exception for execution of non-existing job
(Jarek Jarcec Cecho)


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

Branch: refs/heads/sqoop2
Commit: b16ca584f6553acce9a1c394e04014973d451c44
Parents: e736e4d
Author: Bilung Lee <blee@apache.org>
Authored: Fri Dec 7 19:19:10 2012 -0800
Committer: Bilung Lee <blee@apache.org>
Committed: Fri Dec 7 19:19:10 2012 -0800

----------------------------------------------------------------------
 .../apache/sqoop/repository/JdbcRepository.java    |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/b16ca584/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java b/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
index 2d4d76b..6dc8baa 100644
--- a/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
+++ b/core/src/main/java/org/apache/sqoop/repository/JdbcRepository.java
@@ -412,6 +412,10 @@ public class JdbcRepository implements Repository {
     return (MSubmission) doWithConnection(new DoWithConnection() {
       @Override
       public Object doIt(Connection conn) {
+        if(!handler.existsJob(jobId, conn)) {
+          throw new SqoopException(RepositoryError.JDBCREPO_0020,
+            "Invalid id: " + jobId);
+        }
         return handler.findSubmissionLastForJob(jobId, conn);
       }
     });


Mime
View raw message