Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1327

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      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.

      1. MAPREDUCE-1327.patch
        19 kB
        Leonid Furman
      2. MAPREDUCE-1327.3.patch
        18 kB
        Leonid Furman
      3. MAPREDUCE-1327.4.patch
        22 kB
        Leonid Furman
      4. MAPREDUCE-1327.5.patch
        22 kB
        Leonid Furman

        Activity

        Leonid Furman created issue -
        Leonid Furman made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hadoop Flags [Incompatible change]
        Release Note I generated the patch based on the build from the revision "830358". Therefore, the changes in this patch may not be compatible with the latest build (which contains compilation errors - see revision "896302".

        Once the build has no compiling errors, I can resubmit this patch again. Otherwise, feel free to manually apply the code changes I made to the main trunk after it is reviewed and approved.
        Affects Version/s 0.22.0 [ 12314184 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch.gz [ 12429497 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch [ 12429597 ]
        Leonid Furman made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch [ 12429597 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch.gz [ 12429497 ]
        Leonid Furman made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Leonid Furman made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Leonid Furman made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch [ 12429610 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch [ 12429944 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.patch [ 12429610 ]
        Aaron Kimball made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Leonid Furman made changes -
        Hadoop Flags [Incompatible change]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.3.patch [ 12429970 ]
        Leonid Furman made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.4.patch [ 12430067 ]
        Leonid Furman made changes -
        Attachment MAPREDUCE-1327.5.patch [ 12430085 ]
        Aaron Kimball made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Aaron Kimball made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Chris Douglas made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Release Note I generated the patch based on the build from the revision "830358". Therefore, the changes in this patch may not be compatible with the latest build (which contains compilation errors - see revision "896302".

        Once the build has no compiling errors, I can resubmit this patch again. Otherwise, feel free to manually apply the code changes I made to the main trunk after it is reviewed and approved.
        Assignee Leonid Furman [ lfurman ]
        Resolution Fixed [ 1 ]
        Tom White made changes -
        Fix Version/s 0.21.0 [ 12314045 ]
        Fix Version/s 0.22.0 [ 12314184 ]
        Tom White made changes -
        Fix Version/s 0.21.0 [ 12314045 ]
        Chris Douglas made changes -
        Component/s contrib/sqoop [ 12312930 ]

          People

          • Assignee:
            Leonid Furman
            Reporter:
            Leonid Furman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 96h
              96h
              Remaining:
              Remaining Estimate - 96h
              96h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development