Connectors has to be installed by admins in the cluster. If you have access to install the sqoop driver, below are the links:
Refer http://www.cloudera.com/content/cloudera/en/downloads/connectors/sqoop/oracle/v1-6.html <http://www.cloudera.com/content/cloudera/en/downloads/connectors/sqoop/oracle/v1-6.html> as you are using CDH. And the user guide contains how to use sqoop options to use the new connector ( http://www.cloudera.com/content/cloudera-content/cloudera-docs/Connectors/PDF/oraoopuserguide_1.6.pdf ). Thanks for the attachments. Lets see if the community can help. If I can, I'll certainly help. Can't you use single mapper import? By using *-m 1* Thanks! On Fri, May 8, 2015 at 11:51 AM, Kumar Jayapal <[email protected]> wrote: > Hello Suraj, > > Thanks for the prompt response. yes split by column is a VARCHAR. > > I am using CDH5.3 if I use --driver option I get errors. > > Can you point me to some site which explains connector sample sqoop > command. > > Attached java file and verbose output > > > > > Thanks > Jay > > On May 7, 2015, at 11:28 PM, Suraj Nayak <[email protected]> wrote: > > 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 <[email protected]> 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 > > -- Thanks Suraj Nayak M
