[Moving conversation to sqoop-user@incubator.apache.org. Please subscribe to that list.] Hi, thank you very much for your work on tracing this issue down, can you please submit it to our JIRA that is running on https://issues.apache.org/jira/browse/SQOOP?
Thank you, Jarcec On Tue, Nov 22, 2011 at 10:12:34PM -0800, Xuansu Chen wrote: > Hi, > There is a bug in sqoop. I have a table in mysql which has a > record like 'hello \n world'. It is ok that import this table into > HDFS with sqoop output args (--enclosed-by '\"' --escaped-by '\\' -- > fields-terminated-by '\001' --lines-terminated-by '\002'). However, it > failed to export this HDFS into mysql with sqoop input-args (--input- > enclosed-by '\"' --input-escaped-by '\\' --input-enclosed-by '\"' -- > input-fields-terminated-by '\001' --input-lines-terminated-by '\002') > and throwed a exception as "java.io.IOException: Could not parse > record". > The cause is that recordDelimiterBytes is null of LineRecordReader > which is used by ExportInputFormat in Sqoop, then LineRecordReader > will use default char value \010 to delimete the record. That will > make original record 'hello \n world' splitted into two new records > (one is "hello and the other is world"). When RecordParser parsing the > second record (world"), it find that this record is not began with " > according to sqoop-input-args, so throws an exception. > > -- > NOTE: The mailing list sqoop-u...@cloudera.org is deprecated in favor of > Apache Sqoop mailing list sqoop-user@incubator.apache.org. Please subscribe > to it by sending an email to incubator-sqoop-user-subscr...@apache.org.
signature.asc
Description: Digital signature