[ 
https://issues.apache.org/jira/browse/SQOOP-1369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14745727#comment-14745727
 ] 

Hudson commented on SQOOP-1369:
-------------------------------

FAILURE: Integrated in Sqoop-hadoop20 #1014 (See 
[https://builds.apache.org/job/Sqoop-hadoop20/1014/])
SQOOP-1369: Avro export ignores --columns option (jarcec: 
https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=5fc7a680f854c4a03e9a581079172d453d1a059c)
* src/test/com/cloudera/sqoop/TestAvroExport.java
* src/java/org/apache/sqoop/mapreduce/JdbcExportJob.java
* src/java/org/apache/sqoop/manager/CatalogQueryManager.java
* src/test/org/apache/sqoop/TestSqoopOptions.java
* src/java/org/apache/sqoop/manager/SqlManager.java
* src/java/org/apache/sqoop/SqoopOptions.java
* src/test/org/apache/sqoop/mapreduce/TestJdbcExportJob.java
* src/java/org/apache/sqoop/manager/OracleManager.java
* src/test/org/apache/sqoop/manager/TestSqlManager.java


> Avro export ignores --columns option
> ------------------------------------
>
>                 Key: SQOOP-1369
>                 URL: https://issues.apache.org/jira/browse/SQOOP-1369
>             Project: Sqoop
>          Issue Type: Bug
>            Reporter: Lars Francke
>            Assignee: Paul Mazak
>             Fix For: 1.4.7
>
>         Attachments: SQOOP-1369.patch, SQOOP-1369_2.patch, 
> SQOOP-1369_3.patch, SQOOP-1369_4.patch, SQOOP-1369_5.patch
>
>
> In JdbcExportJob AVRO_COLUMN_TYPES_MAP is being set with the full schema of 
> the output table. This causes the AvroExportMapper to fail with unknown 
> fields if --columns was used to restrict the columns to export (it then tries 
> to set a value on the generated class which doesn't exist).
> There are multiple ways I can see to solve this.
> * Filter the columnTypes passed on to the Mapper in 
> JdbcExportJob.configureInputFormat
> * Pass the --columns value on to the AvroExportMapper and let it ignore 
> things that are not in there
> * Let AvroExportMapper not fail when it can't set a field.
> I might be able to provide a patch and I'd go with the simplest (the first 
> one probably) if there are no objections.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to