sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-1329: JDBC connection to Oracle timeout after data import but before hive metadata import
Date Fri, 30 May 2014 01:39:00 GMT
Repository: sqoop
Updated Branches:
  refs/heads/trunk 18f5b2a77 -> d902d2449


SQOOP-1329: JDBC connection to Oracle timeout after data import but before hive metadata import

(Andrey Dmitriev via 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/d902d244
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/d902d244
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/d902d244

Branch: refs/heads/trunk
Commit: d902d2449f60584de58a101fd128626944d6cd53
Parents: 18f5b2a
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Thu May 29 18:36:29 2014 -0700
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Thu May 29 18:36:29 2014 -0700

----------------------------------------------------------------------
 src/java/org/apache/sqoop/manager/OracleManager.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/d902d244/src/java/org/apache/sqoop/manager/OracleManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/manager/OracleManager.java b/src/java/org/apache/sqoop/manager/OracleManager.java
index 77b8ba3..32cb303 100644
--- a/src/java/org/apache/sqoop/manager/OracleManager.java
+++ b/src/java/org/apache/sqoop/manager/OracleManager.java
@@ -291,8 +291,13 @@ public class OracleManager
     String password = options.getPassword();
     String connectStr = options.getConnectString();
 
+    try {
+      connection = CACHE.getConnection(connectStr, username);
+    } catch (SQLException e) {
+      connection = null;
+      LOG.debug("Cached connecion has expired.");
+    }
 
-    connection = CACHE.getConnection(connectStr, username);
     if (null == connection) {
       // Couldn't pull one from the cache. Get a new one.
       LOG.debug("Creating a new connection for "


Mime
View raw message