问题描述:

Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143 21/10/10 08:51:52 INFO mapreduce.Job: map 100% reduce 0%
21/10/10 08:51:53 INFO mapreduce.Job: Job job_1633826412371_0001 failed with state FAILED due to: Task failed task_1633826412371_0001_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0 21/10/10 08:51:54 INFO mapreduce.Job: Counters: 9
Job Counters
Failed map tasks=4
Launched map tasks=4
Other local map tasks=3
Data-local map tasks=1
Total time spent by all maps in occupied slots (ms)=52317
Total time spent by all reduces in occupied slots (ms)=0
Total time spent by all map tasks (ms)=52317
Total vcore-milliseconds taken by all map tasks=52317
Total megabyte-milliseconds taken by all map tasks=53572608
21/10/10 08:51:54 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
21/10/10 08:51:54 INFO mapreduce.ExportJobBase: Transferred 0 bytes in 110.2385 seconds (0 bytes/sec)
21/10/10 08:51:54 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
21/10/10 08:51:54 INFO mapreduce.ExportJobBase: Exported 0 records.
21/10/10 08:51:54 ERROR tool.ExportTool: Error during export: Export job failed!

解决方案:

①首先查看hive中的表结构是否与mysql一致。(desc 表名称)

如果表结构一致的话可能就是mysql表的字符集不一致导致

②Sqoop导入数据到mysql数据库命令:

bin/sqoop export \
> --connect “jdbc:mysql://master:3306/mysql?useUnicode=true&characterEncoding=utf-8” \
> --username root \
> --password 000000 \
> --table QX_diyu_results \
> --num-mappers 1 \
> --export-dir /user/hive/warehouse/diyu_resaults \
> --input-fields-terminated-by ","

从命令中可以看出我使用的编码为utf8,所以应将mysql中表的字符集修改为utf8

修改完成之后再次运行命令,出现如下结果表示数据导入成功:

Sqoop导入数据到mysql数据库报错:ERROR tool.ExportTool: Error during export: Export job failed!(已解决)的更多相关文章

  1. [大数据技术]Kettle初次连接MySQL数据库 报错问题 错误连接数据库 Error occured while trying to connect to the database Exception while loading class org.gjt.mm.mysql.Driver

    报错内容如下: 错误连接数据库 [foodmartconn] : org.pentaho.di.core.exception.KettleDatabaseException: Error occure ...

  2. 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized...解决方法

    今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or r ...

  3. SpringBoot2整合Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the calling code 【已解决】

    SpringBoot集成Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the callin ...

  4. Mysql数据库报错1264

    数据库报错 [Err] 1264 - Out of range value adjusted for column 'ID' at row 1 修改MYSQL下的my.ini, 将 sql-mode= ...

  5. 关于springboot 连接mysql 数据库报错问题

    springboot连接MySQL运行报错: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more ...

  6. 随笔编号-09 批量导入数据(Mysql)报MySQL server has gone away 问题的解决方法

    问题场景: 使用*.sql 脚本,批量导入数据到mysql实例中,使用DOS 界面导入的,期间,到最后一步 source D:\aaa.sql  回车后,系统提示 MySQL server has g ...

  7. MySQL数据库报错 > 1366 - Incorrect string value: ‘\xE6\xB1\x9F\xE6\x96\x87‘ for column ‘Teacher‘ at row 1

    数据库报错这个多半是数据库在创建的时候没有选择字符编码,导致输入中文的时候出现报错. > 1366 - Incorrect string value: '\xE6\xB1\x9F\xE6\x96 ...

  8. 【MySQL】MySQL同步报错-> Last_IO_Error: Got fatal error 1236 from master when reading data from binary log

    这个报错网上搜索了一下,大部分是由于MySQL意外关闭或强制重启造成的binlog文件事务点读取异常造成的主从同步报错 Last_IO_Error: Got fatal error 1236 from ...

  9. Zabbix导入MySQL数据库报错ERROR 1046 (3D000) at line 1: No database selected

    使用如下命令导入Zabbix数据库时报错 解决办法: 1.先把原始的数据库压缩包备份 cd /usr/share/doc/zabbix-server-mysql-4.0.7/ cp create.sq ...

随机推荐

  1. 直接使用sublime编译stylus

    stylus介绍 Stylus 是一个CSS的预处理框架,2010年产生,来自Node.js社区,主要用来给Node项目进行CSS预处理支持,所以 Stylus 是一种新型语言,可以创建健壮的.动态的 ...

  2. 老版本的Spring应用该如何应对CVE-2022-22965漏洞?

    昨天,在发布了<Spring官宣承认网传大漏洞,并提供解决方案>之后.群里就有几个小伙伴问了这样的问题:我们的Spring版本比较老,该怎么办?这是一个好问题,所以DD今天单独拿出来说说. ...

  3. ubantu系统之 Ubuntu14.04安装Samba实现文件共享

    1 安装    sudo apt-get install samba  2 配置    打开Samba配置文件:    vim /etc/samba/smb.conf      在其最后添加:    ...

  4. 大数据学习之路之ambari配置(二)

    按照网上的教程配置,发现配置到hadoop虚拟机内存就开始不够了,心累

  5. C2678 二进制“<”: 没有找到接受“const ***”类型的左操作数的运算符解决办法

    正确代码如下:#include<iostream> #include<string> #include<map> using namespace std; /*仿函 ...

  6. Mybatis插入数据

    对上文->Mybatis快速入门-<进行代码修改 1.在UserMapper.xml中添加插入操作 <!-- 插入操作--> <insert id="save& ...

  7. JavaWeb学习day7-Response初学4

    重定向和转发的区别 相同 页面都会实现跳转 不同 请求转发的时候url不会发生变化,编码是307 重定向的时候url会变化,编码是302

  8. Java学习day19

    今天学习了窗口监听.和鼠标监听 通过构建自己的输入框监听方法能够实现简单的加法计算器 明天学习Swing,做一个简单的基于鼠标点击操作的画板

  9. 小程序 -- 去掉button默认样式

    button { position:relative; display:block; margin-left:auto; margin-right:auto; padding-left:14px; p ...

  10. go源码阅读 - sync/rwmutex

    相比于Mutex来说,RWMutex锁的粒度更细,使用RWMutex可以并发读,但是不能并发读写,或者写写. 1. sync.RWMutex的结构 type RWMutex struct { // 互 ...