hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kumar Jayapal <kjayapa...@gmail.com>
Subject Sqoop export date error
Date Mon, 27 Jul 2015 23:17:25 GMT
Hi ,

I am trying to export data from hdfs to oracle Its getting error out at
date column.

sqoop export
-Dmapred.child.java.opts="-Djava.security.egd=file:/dev/../dev/urandom"
 --connect "jdbc:oracle:thin:@lorsastest.kjp.com:1521/testus"  --username
usertest -P --table "TEST_BI.DATE_DIMENSION" --export-dir
"/user/hive/warehouse/sandbox.db/date_dimension_text"
 --input-fields-terminated-by '\001' --input-null-string '\\N'
--input-null-non-string '\\N'


I get exception


15/07/27 23:01:00 INFO mapreduce.Job: Task Id :
attempt_1437406596370_5980_m_000001_1, Status : FAILED
Error: java.io.IOException: Can't export data, please check failed map task
logs
        at
org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:112)
        at
org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:39)
        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:415)
        at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
Caused by: java.lang.RuntimeException: Can't parse input data: '1977-05-12'
        at
TEST_BI_DATE_DIMENSION.__loadFromFields(TEST_BI_DATE_DIMENSION.java:1892)
        at TEST_BI_DATE_DIMENSION.parse(TEST_BI_DATE_DIMENSION.java:1645)
        at
org.apache.sqoop.mapreduce.TextExportMapper.map(TextExportMapper.java:83)
        ... 10 more
Caused by: java.lang.IllegalArgumentException: Timestamp format must be
yyyy-mm-dd hh:mm:ss[.fffffffff]
        at java.sql.Timestamp.valueOf(Timestamp.java:202)
        at
TEST_BI_DATE_DIMENSION.__loadFromFields(TEST_BI_DATE_DIMENSION.java:1699)
        ... 12 more



Thanks
Jay

Mime
View raw message