sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject svn commit: r1225123 - in /incubator/sqoop/trunk: build.xml src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java
Date Wed, 28 Dec 2011 07:20:56 GMT
Author: jarcec
Date: Wed Dec 28 07:20:55 2011
New Revision: 1225123

URL: http://svn.apache.org/viewvc?rev=1225123&view=rev
Log:
SQOOP-418. MySQLAuthTest hangs when run against MySQL 5.5.3 or higher version

(Arvind Prabhakar via Jarek Jarcec Cecho)

Modified:
    incubator/sqoop/trunk/build.xml
    incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java

Modified: incubator/sqoop/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/build.xml?rev=1225123&r1=1225122&r2=1225123&view=diff
==============================================================================
--- incubator/sqoop/trunk/build.xml (original)
+++ incubator/sqoop/trunk/build.xml Wed Dec 28 07:20:55 2011
@@ -226,6 +226,12 @@
   <property name="sqoop.test.sqlserver.connectstring.host_url"
             value="jdbc:sqlserver://sqlserverhost:1433"/>
 
+  <property name="java.security.krb5.realm"
+            value="OX.AC.UK"/>
+
+  <property name="java.security.krb5.kdc"
+            value="kdc0.ox.ac.uk:kdc1.ox.ac.uk"/>
+
   <!-- The classpath for compiling and running Sqoop -->
   <if>
     <isset property="hadoop.home" />
@@ -689,6 +695,12 @@
       <sysproperty key="sqoop.test.sqlserver.connectstring.host_url"
                    value="${sqoop.test.sqlserver.connectstring.host_url}"/>
 
+      <sysproperty key="java.security.krb5.realm"
+                   value="${java.security.krb5.realm}"/>
+
+      <sysproperty key="java.security.krb5.kdc"
+                   value="${java.security.krb5.kdc}"/>
+
       <classpath>
         <!-- instrumented classes go ahead of normal classes -->
         <pathelement location="${cobertura.class.dir}" />

Modified: incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java
URL: http://svn.apache.org/viewvc/incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java?rev=1225123&r1=1225122&r2=1225123&view=diff
==============================================================================
--- incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java (original)
+++ incubator/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/db/DBRecordReader.java Wed Dec
28 07:20:55 2011
@@ -247,6 +247,21 @@ public class DBRecordReader<T extends DB
       pos++;
     } catch (SQLException e) {
       LoggingUtils.logAll(LOG, e);
+      if (this.statement != null) {
+        try {
+          statement.close();
+        } catch (SQLException ex) {
+          LOG.error("Failed to close statement", ex);
+        }
+      }
+      if (this.connection != null) {
+        try {
+          connection.close();
+        } catch (SQLException ex) {
+          LOG.error("Failed to close connection", ex);
+        }
+      }
+
       throw new IOException("SQLException in nextKeyValue", e);
     }
     return true;



Mime
View raw message