sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SQOOP-451) Add new options for format masks for date, time, and timestamp
Date Sat, 17 Mar 2012 00:18:39 GMT

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

jiraposter@reviews.apache.org commented on SQOOP-451:
-----------------------------------------------------


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

Review request for Sqoop.


Summary
-------

Add new options via which the user can specify format masks for date, time, and timestamp
columns:

--date-mask
--time-mask
--timestamp-mask

To manipulate text from/to the DB, I am using SimpleDateFormat.

The changes include:

1) Add format mask options as Sqoop common options.
2) Update ClassWriter so that SimpleDateFormat format() call can be generated in the toString()
method.
3) Update ClassWriter so that SimpleDateFormat parse() call can be generated in the __loadFromFields()
method.
4) Add new tests for import format to ManagerCompatTest and its subclasses.
5) Add new tests for export parse to TestExport and its subclasses.
6) Introduce regular expressions into OracleExportTest to get rid of try-catch blocks.
   (The format mask options do not format direct output from JDBC drivers.)
7) Fix a minor bug in MySQLCompatTest regarding discarded fractional seconds.


This addresses bug SQOOP-451.
    https://issues.apache.org/jira/browse/SQOOP-451


Diffs
-----

  ./src/java/com/cloudera/sqoop/tool/BaseSqoopTool.java 1301119 
  ./src/java/org/apache/sqoop/SqoopOptions.java 1301119 
  ./src/java/org/apache/sqoop/orm/ClassWriter.java 1301119 
  ./src/java/org/apache/sqoop/tool/BaseSqoopTool.java 1301119 
  ./src/test/com/cloudera/sqoop/TestExport.java 1301119 
  ./src/test/com/cloudera/sqoop/manager/DirectMySQLExportTest.java 1301119 
  ./src/test/com/cloudera/sqoop/manager/JdbcMySQLExportTest.java 1301119 
  ./src/test/com/cloudera/sqoop/manager/MySQLCompatTest.java 1301119 
  ./src/test/com/cloudera/sqoop/manager/OracleCompatTest.java 1301119 
  ./src/test/com/cloudera/sqoop/manager/OracleExportTest.java 1301119 
  ./src/test/com/cloudera/sqoop/testutil/ImportJobTestCase.java 1301119 
  ./src/test/com/cloudera/sqoop/testutil/ManagerCompatTestCase.java 1301119 

Diff: https://reviews.apache.org/r/4327/diff


Testing
-------

- Various format mask tests for import jobs are added to ManagerCompatTest.
- Various format mask tests for export jobs are added to TestExport.
- Ran ant test, ant test -Dthirdparty=true, and ant checkstyle.


Thanks,

Cheolsoo


                
> Add new options for format masks for date, time, and timestamp
> --------------------------------------------------------------
>
>                 Key: SQOOP-451
>                 URL: https://issues.apache.org/jira/browse/SQOOP-451
>             Project: Sqoop
>          Issue Type: Improvement
>            Reporter: Cheolsoo Park
>            Assignee: Cheolsoo Park
>            Priority: Minor
>
> Add new options via which the user can specify format masks for date, time, and timestamp
columns.
> The propose is to add pattern matching code to the toString() method of SqoopRecord so
that when the output is written to files, it can be modified accordingly.

--
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