sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Khatri <chetan.opensou...@gmail.com>
Subject Running two Sqoop commands from Spark Job
Date Thu, 29 Aug 2019 19:39:31 GMT
Hi Sqoop Users,

I am running Sqoop commands from from a Spark Job, Sometime it is getting
success and sometime it's failing;

I am keep getting this exception; Can you please help me to point on cause
and solution. Thanks

2019-08-28 16:43:21,064 ERROR [main]
org.apache.sqoop.mapreduce.db.DBRecordReader: Top level exception:

com.microsoft.sqlserver.jdbc.SQLServerException: An error occurred while
converting the nvarchar value to JDBC data type INTEGER.

        at
com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:653)

        at
com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:4053)

        at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:226)

        at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:144)

        at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2099)

        at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2084)

        at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2327)

        at
org.apache.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWritableBridge.java:49)

        at QueryResult.readFields(QueryResult.java:226)

        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:242)

        at
org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader.nextKeyValue(SQLServerDBRecordReader.java:178)

        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:170)

        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:1869)

        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)

Caused by: java.lang.NumberFormatException: For input string: "company"

        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

        at java.lang.Integer.parseInt(Integer.java:580)

        at java.lang.Integer.valueOf(Integer.java:766)

        at
com.microsoft.sqlserver.jdbc.DDC.convertStringToObject(DDC.java:465)

        at
com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:616)

        ... 22 more

2019-08-28 16:43:21,071 WARN [main]
org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader: Trying to recover
from DB read failure:

java.io.IOException: SQLException in nextKeyValue

        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:275)

        at
org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader.nextKeyValue(SQLServerDBRecordReader.java:178)

        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:170)

        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:1869)

        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:164)

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: An error
occurred while converting the nvarchar value to JDBC data type INTEGER.

        at
com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:653)

        at
com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:4053)

        at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:226)

        at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:144)

        at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2099)

        at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2084)

        at
com.microsoft.sqlserver.jdbc.SQLServerResultSet.getInt(SQLServerResultSet.java:2327)

        at
org.apache.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWritableBridge.java:49)

        at QueryResult.readFields(QueryResult.java:226)

        at
org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:242)

        ... 13 more

Caused by: java.lang.NumberFormatException: For input string: "company"

        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

Mime
View raw message