【发布时间】:2020-06-06 22:49:32
【问题描述】:
我正在尝试使用 Sqoop 将 impala 表从 HDFS 导出到 MySQL。该表已经在 MySQL 中创建,并且两个表的模式应该匹配。
Impala table information:
1 start_date string
2 start_station_code string
3 end_date string
4 end_station_code string
5 duration_sec int
6 is_member int
7 cnt bigint
Impala table sample:
2019-05-05 14:07:42100022019-05-05 14:31:087143140611322
2019-05-08 17:51:57100022019-05-08 17:55:29705221101322
2019-05-05 14:07:40100022019-05-05 14:31:087143140711322
2019-05-07 09:55:48100022019-05-07 10:02:28672439911322
2019-05-03 06:54:38100022019-05-03 06:59:51705231201322
2019-05-07 09:56:33100022019-05-07 10:02:17705234311322
2019-05-05 14:06:40100022019-05-05 14:18:04642768411322
2019-05-01 08:54:36100022019-05-01 08:58:20705222301322
2019-05-02 09:17:22100022019-05-02 09:22:16692129401322
2019-05-02 09:16:37100022019-05-02 09:19:30705217201322
2019-05-06 07:09:54100022019-05-06 07:18:45608453111322
MySQL Table information:
+--------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------------+-------------+------+-----+---------+-------+
| start_date | varchar(10) | YES | | NULL | |
| start_station_code | varchar(20) | YES | | NULL | |
| end_date | varchar(20) | YES | | NULL | |
| end_station_code | varchar(20) | YES | | NULL | |
| duration_sec | int(11) | YES | | NULL | |
| is_member | int(11) | YES | | NULL | |
| cnt | bigint(20) | YES | | NULL | |
+--------------------+-------------+------+-----+---------+-------+
Export code:
sqoop export --connect jdbc:mysql://localhost/oozie --username root --password root --table bixirides_export --export-dir /user/hive/warehouse/impala_out/6* -m 1 --input-fields-terminated-by "|";
由于某种原因,一旦 Map 任务达到 100%,sqoop 导出就会失败。架构应该正确匹配,但由于某种原因导出失败。
Error Message:
ERROR tool.ExportTool: Error during export:
Export job failed!
【问题讨论】:
标签: mysql hdfs sqoop impala hue