sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suraj Nayak <snay...@gmail.com>
Subject Re: Sqoop error
Date Fri, 08 May 2015 06:28:40 GMT
Hi Jay,

Is the split by column non-integer? I mean, is it char/text or varchar ? If
you don't get error with -m 1 (Single mapper), then the issue is with the
data containing control characters or single quotes or semicolon. This is
probably making the sqoop code generation with these characters in the
query which gets fired on each map tasks.

Even I had faced the same issue when the split by column is text in oracle
and had some control characters like *^M *causing this task failures.

Try to share the generated .java code so we can pin point the issue.

Or you can use the Oracle connector instead. And see if the error goes away!

Thanks!
Suraj Nayak

On Thu, May 7, 2015 at 11:19 PM, Hadoop User <kjayapal17@gmail.com> wrote:

> Can some one please help me.
>
> I am running the simple sqoop command to import the table with split by
> options I am getting this error. Does any one solved this error before.
>
> I searched site no resolution so far.
>
> sqoop command
>
>  sqoop import --connect "jdbc:oracle:thin:@mysql.1521/PR" --username
> "edhdtaesvc" --P  --table "SAPSR3.BUT000" --map-column-java "PARTNER=Long"
> --split-by "SAPSR3.BUT000.PARTNER" --target-dir
> "/data/crmdq/CS2_PR/BUT000_MAP50" --as-avrodatafile --compression-codec
> org.apache.hadoop.io.compress.SnappyCodec --m 50
>
>
>
>
> 15/05/08 05:26:54 INFO mapreduce.Job: Task Id :
> attempt_1430997877297_0255_m_000010_1, Status : FAILED
> Error: java.io.IOException: SQLException in nextKeyValue
>         at
> org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:277)
>         at
> org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:553)
>         at
> org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(MapContextImpl.java:80)
>         at
> org.apache.hadoop.mapreduce.lib.map.WrappedMapper$Context.nextKeyValue(WrappedMapper.java:91)
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>         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.sql.SQLSyntaxErrorException: ORA-00907: missing right
> parenthesis
>
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
>         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
>         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
>         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
>         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
>         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
>         at
> oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
>         at
> oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
>         at
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
>         at
> oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
>         at
> oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
>         at
> org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:111)
>         at
> org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:235)
>
>
>
>
>
>
>
> Thanks
> Jay




-- 
Thanks
Suraj Nayak M

Mime
View raw message