You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Stefano Ghezzi (JIRA)" <ji...@apache.org> on 2016/07/27 08:24:20 UTC
[jira] [Commented] (SQOOP-2594) Sqoop export from Avro to Oracle
fails with Integer cannot be cast to BigDecimal
[ https://issues.apache.org/jira/browse/SQOOP-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395222#comment-15395222 ]
Stefano Ghezzi commented on SQOOP-2594:
---------------------------------------
Just to let you know that i've solved the very same problem using the sqoop options
--hcatalog-database
--hcatalog-table
In this way hive type is correctly converted in oracle data types
> Sqoop export from Avro to Oracle fails with Integer cannot be cast to BigDecimal
> --------------------------------------------------------------------------------
>
> Key: SQOOP-2594
> URL: https://issues.apache.org/jira/browse/SQOOP-2594
> Project: Sqoop
> Issue Type: Bug
> Affects Versions: 1.4.5, 1.4.7
> Reporter: Zoltan Fedor
>
> 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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)