sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Jarcec Cecho (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SQOOP-520) Avro Import fails on due to collision between column names starting with numbers and prefixed underscore
Date Wed, 25 Jul 2012 17:58:35 GMT

     [ https://issues.apache.org/jira/browse/SQOOP-520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jarek Jarcec Cecho resolved SQOOP-520.
--------------------------------------

    Resolution: Not A Problem
      Assignee: Jarek Jarcec Cecho

Hi Glyton,
I've tried your issue on most recent 1.4.1 release and everything seems to be working fine.

Please do not hesitate to open this ticket in case that you will see issues on 1.4.1.

Jarcec
                
> Avro Import fails on due to collision between column names starting with numbers and
prefixed underscore 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SQOOP-520
>                 URL: https://issues.apache.org/jira/browse/SQOOP-520
>             Project: Sqoop
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3.0
>            Reporter: Glyton Camilleri
>            Assignee: Jarek Jarcec Cecho
>
> When performing an import as avro datafile, Sqoop fails with the following exception:
> {code}
> 12/07/24 15:59:20 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.IllegalArgumentException:
Duplicate Column identifier specified: '_1D'
> java.lang.IllegalArgumentException: Duplicate Column identifier specified: '_1D'
> 	at com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:1072)
> 	at com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:84)
> 	at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:370)
> 	at com.cloudera.sqoop.tool.ImportAllTablesTool.run(ImportAllTablesTool.java:66)
> 	at com.cloudera.sqoop.Sqoop.run(Sqoop.java:146)
> 	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
> 	at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:182)
> 	at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:221)
> 	at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:230)
> 	at com.cloudera.sqoop.Sqoop.main(Sqoop.java:239)
> {code}
> The problem seems to be when generating avro schemas and java classes - column and table
names starting with illegal identifiers are prefixed with an underscore, so for a table such
as the following, a duplicate column name is generated.
> {code}
> +-------+---------+------+-----+---------+-------+
> | Field | Type    | Null | Key | Default | Extra |
> +-------+---------+------+-----+---------+-------+
> | 1D    | int(11) | YES  |     | NULL    |       |
> | _1D   | int(11) | YES  |     | NULL    |       |
> +-------+---------+------+-----+---------+-------+
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message