解决sqoop报错:SQLServerException: 将字符串转换为 uniqueidentifier 时失败。
Posted 凿石刻字
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决sqoop报错:SQLServerException: 将字符串转换为 uniqueidentifier 时失败。相关的知识,希望对你有一定的参考价值。
报错栈:
Error: java.io.IOException: Cannection handler cannot recover failure: at org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader.nextKeyValue(SQLServerDBRecordReader.java:169) 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: java.io.IOException: SQLException in nextKeyValue at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:277) at org.apache.sqoop.mapreduce.db.SQLServerDBRecordReader.nextKeyValue(SQLServerDBRecordReader.java:148) ... 12 more Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 将字符串转换为 uniqueidentifier 时失败。 at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216) at com.microsoft.sqlserver.jdbc.SQLServerResultSet$FetchBuffer.nextRow(SQLServerResultSet.java:4853) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.fetchBufferNext(SQLServerResultSet.java:1781) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:1034) at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:237) ... 13 more
解决:uniqueidentifier类型的列不能作为参数--split-by的值
以上是关于解决sqoop报错:SQLServerException: 将字符串转换为 uniqueidentifier 时失败。的主要内容,如果未能解决你的问题,请参考以下文章
解决sqoop报错:SQLServerException: 将字符串转换为 uniqueidentifier 时失败。
解决sqoop报错Invalid number; item = ITEM_UNICODE
解决sqoop报错:java.lang.OutOfMemoryError: Java heap space
解决Sqoop报错Could not load db driver class: com.intersys.jdbc.CacheDriver
解决sqoop导入报错:Caused by: java.sql.SQLException: Protocol violation
解决sqoop 导入oracle表时 --split-by参数为日期类型时的报错:ORA-01861: literal does not match format string