Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # dev >> Review Request: SQOOP-352 Export of avro data imported from database table (using sqoop import) fails on year


Copy link to this message
-
Re: Review Request: SQOOP-352 Export of avro data imported from database table (using sqoop import) fails on year

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3845/
-----------------------------------------------------------

(Updated 2012-03-02 22:48:24.704210)
Review request for Sqoop, Arvind Prabhakar, Tom White, and Jarek Cecho.
Changes
-------

Thanks for your comments, Arvind!

New patch is attached.
Summary
-------

MySQL YEAR is mapped to java.sql.Date when importing to HDFS. On the way back an exception is thrown because the date and month fields are truncated (not used) - this is the MySQL behaviour.
This addresses bug SQOOP-352.
    https://issues.apache.org/jira/browse/SQOOP-352
Diffs (updated)
-----

  ./src/java/org/apache/sqoop/hive/TableDefWriter.java 1296490
  ./src/java/org/apache/sqoop/manager/ConnManager.java 1296490
  ./src/java/org/apache/sqoop/manager/MySQLManager.java 1296490
  ./src/java/org/apache/sqoop/manager/OracleManager.java 1296490
  ./src/java/org/apache/sqoop/manager/SqlManager.java 1296490
  ./src/java/org/apache/sqoop/mapreduce/JdbcExportJob.java 1296490
  ./src/java/org/apache/sqoop/orm/AvroSchemaGenerator.java 1296490
  ./src/java/org/apache/sqoop/orm/ClassWriter.java 1296490
  ./src/test/com/cloudera/sqoop/manager/MySQLCompatTest.java 1296490

Diff: https://reviews.apache.org/r/3845/diff
Testing
-------
Thanks,

Bilung