将所有表从mysql压缩到Hive导入

时间:2018-09-01 09:37:25

标签: hive sqoop

我正在尝试通过使用打击窥探查询将所有表从mysql模式导入到配置单元中:-

sqoop import-all-tables --connect jdbc:mysql://ip-172-31-20-247:3306/retail_db --username sqoopuser -P --hive-import --hive-import --create-hive-table -m 3

是说,

18/09/01 09:24:52 ERROR tool.ImportAllTablesTool: Encountered IOException running import job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory
 hdfs://ip-172-31-35-141.ec2.internal:8020/user/kumarrupesh2389619/categories already exists

1 个答案:

答案 0 :(得分:0)

运行以下命令

hdfs dfs -rmr /user/kumarrupesh2389619/categories

由于目录已存在,您的命令失败。