[jira] [Created] (SQOOP-3049) Sqoop import fails for MySQL when --where option has column name with space
Suchitra Ramani created SQOOP-3049: -- Summary: Sqoop import fails for MySQL when --where option has column name with space Key: SQOOP-3049 URL: https://issues.apache.org/jira/browse/SQOOP-3049 Project: Sqoop Issue Type: Bug Affects Versions: 1.4.6 Reporter: Suchitra Ramani Having trouble with sqoop import command when --where option has column name with a space. Database is MySQL. MySQL table {code} create table testsqoop(`x t` integer); insert into testsqoop values(1); insert into testsqoop values(2); insert into testsqoop values(3); insert into testsqoop values(4); insert into testsqoop values(5); select * from testsqoop where `x t` > 2; +--+ | x t | +--+ |3 | |4 | |5 | +--+ 3 rows in set (0.00 sec) {code} Sqoop command {code} sqoop import --connect 'jdbc:mysql://127.0.0.1:3306/mytestdb?zeroDateTimeBehavior=convertToNull&?user=test=test' --username test --password test --driver com.mysql.jdbc.Driver --table testsqoop --target-dir /user/tmp/testsqoop -m 1 --hive-import --hive-overwrite --hive-table default.test --hive-delims-replacement ' ' --outdir /tmp/ --direct --where "\`x t\` > 2" {code} Error {code} 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:556) 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:145) at org.apache.sqoop.mapreduce.AutoProgressMapper.run(AutoProgressMapper.java:64) at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:787) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '> 2 ) AND ( 1=1 ) AND ( 1=1 )' at line 1 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885) at org.apache.sqoop.mapreduce.db.DBRecordReader.executeQuery(DBRecordReader.java:111) at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:235) ... 12 more {code} Note - The free style query option works {code} sqoop import --connect 'jdbc:mysql://127.0.0.1:3306/mytestdb?zeroDateTimeBehavior=convertToNull&?user=test=test' --username test --password test --driver com.mysql.jdbc.Driver --target-dir /user/tmp/testsqooq -m 1 --hive-import --hive-overwrite --hive-table default.test --hive-delims-replacement ' ' --outdir /tmp/ --direct --query "select * from testsqoop where \`x t\` > 2 AND \$CONDITIONS" {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
timeline for Sqoop 1.4.7
Hello everyone, Latest stable version of Sqoop is 1.4.6, is there any timeline for next version 1.4.7? I have check Sqoop 1.4.7 JIRA with following URI, https://issues.apache.org/jira/browse/SQOOP/fixforversion/12329683/?selectedTab=com.atlassian.jira.jira-projects-plugin:version-summary-panel Sqoop 1.4.7 is between 1.99.7 and 1.99.8, does it means 1.4.7 is next release version after 1.99.7, and 1.99.8 release is after 1.4.7?
Integration tests - would like some guidance
Hi, I'm trying to complete an integration test for a patch but run into the following error:- com.google.protobuf.InvalidProtocolBufferException: Message missing required fields: callId, status The patch works as a regular sqoop command so how is it different with integration tests? I suspect something like a different version of a dependency that could be causing the issue. Anyone encountered this before and fixed it? Kind regards Chris
[jira] [Assigned] (SQOOP-3028) Include stack trace in the logging of exceptions in ExportTool
[ https://issues.apache.org/jira/browse/SQOOP-3028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Boglarka Egyed reassigned SQOOP-3028: - Assignee: Boglarka Egyed > Include stack trace in the logging of exceptions in ExportTool > -- > > Key: SQOOP-3028 > URL: https://issues.apache.org/jira/browse/SQOOP-3028 > Project: Sqoop > Issue Type: Improvement >Reporter: Attila Szabo >Assignee: Boglarka Egyed >Priority: Trivial > Fix For: 1.4.7 > > > Currently only the message of the IOException/Export is logged in runExport > method. Although it's possible to rethrow the root cause as a runtime > exception it would be nice to improve to add an option which makes possible > to have the improved logging details without an additional exception (as that > could be problematic on tooling side). -- This message was sent by Atlassian JIRA (v6.3.4#6332)