解决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(JdbcWritableBridge.java:52)
    at com.cloudera.sqoop.lib.JdbcWritableBridge.readInteger(JdbcWritableBridge.java:53)
    at QueryResult.readFields(QueryResult.java:246)
    at org.apache.sqoop.mapreduce.db.DBRecordReader.nextKeyValue(DBRecordReader.java:244)
    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)

问题的根本原因是字段值类型异常,本来应该是数字型,里面却存了unicode字符。使用报错信息查不到相关资料,另外增加参数也不能解决:-D mapreduce.map.failures.maxpercent=1, query里面增加: and Specimen is not null 也不能解决。(Specimen是报错字段)。

靠谱的解决办法是找出这行异常数据,在数据库中纠正或删除。如果想临时解决,可以把这个字段在导入时转换类型为字符:--map-column-java Specimen=String。

时间: 2024-10-22 09:49:35

解决sqoop报错Invalid number; item = ITEM_UNICODE的相关文章

解决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.nextKeyVal

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

vue调用组件,组件回调给data中的数组赋值,报错Invalid prop type check failed for prop value. Expecte

报错信息: 代码信息:调用一个tree组件,选择一些信息 <componentsTree ref="typeTreeComponent" @treeCheck="treeCheck" :isClearAllChecked=true :defaultProps="defaultProps"> </componentsTree> 选择之后返回选中数据信息,并且在父组件中给data中的数组(type.typeName)赋值: d

refiling失败报错Invalid function: org-preserve-local-variables

refiling失败报错Invalid function: org-preserve-local-variables,原因: elc,不太清楚 解决办法: 删除org??目录下的elc文件 https://github.com/syl20bnr/spacemacs/issues/11801 https://emacs-china.org/t/spacemacs-org-mode-org-refile/8157 在github上已经有了相关的Issue, #11788 #11801 解决方案如下:

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&#39;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 &#39;information_schema.PROFILING.SEQ&#39;

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