[ https://issues.apache.org/jira/browse/MAPREDUCE-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798954#action_12798954 ]
Aaron Kimball commented on MAPREDUCE-1327: ------------------------------------------ Leonid, Thanks for the new patch. Note that Hudson won't be able to apply this -- you generated it with paths like 'hadoop-mapreduce/src/contrib/sqoop/...'; you'll need to recreate the patch so that it applies with {{patch -p0}} (i.e., paths like 'src/contrib/sqoop/...') I noticed that you have flagged this issue as an incompatible change. What API are you breaking / other incompatibility are you introducing with this issue? Also, please don't delete the old patch file when you upload a new one -- sometimes it's helpful to refer to older versions of the code. Instead, just upload new versions, maybe with a numeric id (see MAPREDUCE-1126 for an example.) After applying this patch, the oracle test now fails for me with: {code} Testcase: testOracleImport took 3.542 sec FAILED null expected:<...ineering,2009-12-29 [12.00.00.0,2009-12-29 12.00.]00.0> but was: <...ineering,2009-12-29 [04:00:00.0,2009-12-29 04:00:]00.0> junit.framework.ComparisonFailure: null expected:<...ineering,2009-12-29 [12.00.00.0,2009-12-29 12.00.]00.0> but was:<...ineering,2009-12-29 [04:00:00.0,2009-12-29 04:00:]00.0> at org.apache.hadoop.sqoop.manager.OracleManagerTest.runOracleTest(OracleManagerTest.java:193) at org.apache.hadoop.sqoop.manager.OracleManagerTest.testOracleImport(OracleManagerTest.java:218) {code} I suspect this is due to timezone normalization (12:00 vs 04:00). You may need to determine the correct timezone and make the test expect a different result based on its offset. The new changes in the patch look good though. One nitpick about the code: SqlManager.java: "This method can no longer remain static" -- no need for this comment; since the code doesn't say 'static' in it any more, that'll be out-of-context. > Oracle database import via sqoop fails when a table contains the column types > such as TIMESTAMP(6) WITH LOCAL TIME ZONE and TIMESTAMP(6) WITH TIME ZONE > ------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: MAPREDUCE-1327 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-1327 > Project: Hadoop Map/Reduce > Issue Type: Bug > Components: contrib/sqoop > Affects Versions: 0.22.0 > Reporter: Leonid Furman > Fix For: 0.22.0 > > Attachments: MAPREDUCE-1327.patch > > Original Estimate: 96h > Remaining Estimate: 96h > > When Oracle table contains the columns "TIMESTAMP(6) WITH LOCAL TIME ZONE" > and "TIMESTAMP(6) WITH TIME ZONE", Sqoop fails to map values for those > columns to valid Java data types, resulting in the following exception: > ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException > java.lang.NullPointerException > at > org.apache.hadoop.sqoop.orm.ClassWriter.generateFields(ClassWriter.java:253) > at > org.apache.hadoop.sqoop.orm.ClassWriter.generateClassForColumns(ClassWriter.java:701) > at > org.apache.hadoop.sqoop.orm.ClassWriter.generate(ClassWriter.java:597) > at org.apache.hadoop.sqoop.Sqoop.generateORM(Sqoop.java:75) > at org.apache.hadoop.sqoop.Sqoop.importTable(Sqoop.java:87) > at org.apache.hadoop.sqoop.Sqoop.run(Sqoop.java:175) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) > at org.apache.hadoop.sqoop.Sqoop.main(Sqoop.java:201) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > I have modified the code for Hadoop and Sqoop so this bug is fixed on my > machine. Please let me know if you would like me to generate the patch and > upload it to this ticket. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.