----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11940/#review22096 -----------------------------------------------------------
Hi Raghav, thank you very much for taking up this one! src/java/org/apache/sqoop/hive/HiveImport.java <https://reviews.apache.org/r/11940/#comment45487> Just brainstorming here, would it make sense to use Connection.isValid() [1] and discard the connection only in case that it's invalid? Rather than discarding even valid connection? (Such code would have to be in the ConnectionManager of course) Links: 1: http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#isValid(int) src/java/org/apache/sqoop/manager/ConnManager.java <https://reviews.apache.org/r/11940/#comment45486> I'm afraid that adding new abstract method to ConnManager is backward incompatible change. We should provide default implementation throwing NotImplementedException or something similar in the ConnManager class. Jarcec - Jarek Cecho On June 18, 2013, 5:58 p.m., Raghav Gautam wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/11940/ > ----------------------------------------------------------- > > (Updated June 18, 2013, 5:58 p.m.) > > > Review request for Sqoop. > > > Description > ------- > > This patches fixes the SQOOP-934. The connection created prior to map-reduce > job can potentially timed out while the job is running. This will cause > problems when this connection is reused for generating the hive script. This > patch discards the connection prior to hive script generation. So, a fresh > connection will be used for generating hive script. > > > This addresses bug SQOOP-934. > https://issues.apache.org/jira/browse/SQOOP-934 > > > Diffs > ----- > > src/java/org/apache/sqoop/hive/HiveImport.java 02596a6 > src/java/org/apache/sqoop/manager/ConnManager.java 32e736c > src/java/org/apache/sqoop/manager/GenericJdbcManager.java 233e546 > src/test/com/cloudera/sqoop/TestConnFactory.java c0b295e > > Diff: https://reviews.apache.org/r/11940/diff/ > > > Testing > ------- > > Unit tests pass. > Manually tested hive import. > > > Thanks, > > Raghav Gautam > >
