Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-2594

Sqoop export from Avro to Oracle fails with Integer cannot be cast to BigDecimal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4.5, 1.4.7
    • None
    • None
    • None

    Description

      Trying to move an avro-backed Hive table to Oracle using sqoop export.
      The table has some int and bigint columns.
      Exporting into Oracle fails with:
      15/09/29 19:54:02 INFO mapreduce.Job: Task Id : attempt_1436064325770_499944_m_000000_0, Status : FAILED
      Error: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
      at WEATHER.setField(WEATHER.java:344)
      at org.apache.sqoop.mapreduce.AvroExportMapper.toSqoopRecord(AvroExportMapper.java:120)
      at org.apache.sqoop.mapreduce.AvroExportMapper.map(AvroExportMapper.java:104)
      at org.apache.sqoop.mapreduce.AvroExportMapper.map(AvroExportMapper.java:49)
      at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
      at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64)
      at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:784)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
      at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:422)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
      at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)

      This seems to be a similar issue to https://issues.apache.org/jira/browse/SQOOP-2564

      Attachments

        Activity

          People

            Unassigned Unassigned
            fedorz Zoltan Fedor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: