解决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的值

时间: 2024-10-19 14:40:59

解决sqoop报错:SQLServerException: 将字符串转换为 uniqueidentifier 时失败。的相关文章

解决sqoop报错Invalid number; item = ITEM_UNICODE

报错栈: java.sql.SQLException: Invalid number; item = ITEM_UNICODE at com.intersys.jdbc.SysList.getInt(SysList.java:1735) at com.intersys.jdbc.CacheResultSet.getInt(CacheResultSet.java:247) at org.apache.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWrit

解决sqoop报错:java.lang.OutOfMemoryError: Java heap space

报错栈: 2017-06-15 16:24:50,449 INFO [main] org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select "CTJX60","CTJX61","CTJX62","CTJX63","CTJX64","CTJX65","CTJX66","CTJX6

解决Sqoop报错Could not load db driver class: com.intersys.jdbc.CacheDriver

报错栈: 17/06/16 17:46:01 INFO tool.CodeGenTool: Beginning code generation 17/06/16 17:46:01 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.intersys.jdbc.CacheDriver java.lang.RuntimeExcep

解决IE报错:Locale 'chinese' is not well-formed,或RangeError: 区域设置“chinese”的格式不正确的问题

接之前的此博客问题处理:js处理时间时区问题 由于 toLocaleString():据本地时间格式,把 Date 对象转换为字符串.总是会带有上午/下午,所以我加了参数:new Date('2019-09-12 23:33:33').toLocaleString('chinese', {hour12: false}),这样返回的字符串就是24小时制,而没有上午下午. 但是,在IE浏览器下就会报标题的错误,期初不知道是什么原因,经过排查发现就是这个参数问题. 所以我们需要修改下:可以利用 toU

git:Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists).

Git fetch和git pull的区别, 解决Git报错:error: You have not concluded your merge (MERGE_HEAD exists). 解决办法一:保留本地的更改,中止合并->重新合并->重新拉取 $:git merge --abort $:git reset --merge $:git pull 解决办法二:舍弃本地代码,远端版本覆盖本地版本(慎重) $:git fetch --all $:git reset --hard origin/ma

解决tomcat报错javax.imageio.IIOException: Can't create output stream!

启动tomcat catalina.out报错如下,登陆的时候无法显示验证码 2017-06-09 11:23:06,628 DEBUG org.springframework.web.servlet.DispatcherServlet 845 - DispatcherServlet with name 'spring-mvc' processing GET request for [/data-analysis/kaptchaImage.do]2017-06-09 11:23:06,629 D

系统调优:如何解决系统报错too many open files瓶颈

一.检查系统版本是否手工升级 [[email protected] ~]# uname -r   linux的内核版本号 2.6.32-358.el6.x86_64 [[email protected] ~]# cat /proc/version Linux version 2.6.32-358.el6.x86_64  [[email protected] ~]# cat /etc/issue  系统安装时默认的发行版本 CentOS release 6.4 (Final) [[email pr

解决mysql报错:- Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ'

mysql执行报错: - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_fu

解决yum报错:UnicodeDecodeError: 'ascii' codec can't decode ... ordinal not in range

在使用yum部署环境的时候,出现了报错: UnicodeDecodeError: 'ascii' codec can't decode ... ordinal not in range 解决办法: [[email protected] ~]# ll /var/lib/rpm/*db*-rw-r--r-- 1 root root 73728 Aug 15 14:52 /var/lib/rpm/__db.001-rw-r--r-- 1 root root 270336 Aug 15 14:52 /v