无法通过增量lastmodified合并part-m-0000 *

时间:2017-11-04 22:05:12

标签: hadoop hive sqoop

我首先通过

导入了表格
sqoop import --connect jdbc:mysql://192.168.1.18/mysql --table mytable \    
--username raj --password root --target-dir /find1/1t -m 1

然后我尝试使用

创建一个增量的lastmodified附加作业
sqoop job --create tasy \
-- import --connect jdbc:mysql://192.168.2.13/mysql --table mytable \
--username raj --password root --incremental lastmodified --append --check-
column lastUpdated --last-value "2017-11-05 02:43:43" --target-dir /find1/3t 
-m 1

并使用

触发作业
sqoop job --exec tasy

然后我尝试使用

合并新目录中的部分文件
sqoop merge --merge-key lastUpdated --new-data \
/find1/3t/part-m-0000* --onto /find1/1t --target-dir  \
/find5 --class-name mytable \
--jar-file /home/user/Desktop/mytable.jar

但每次都发生错误

This was the error This is my table schema

当我使用

sqoop merge --merge-key lastUpdated --new-data \
/find1/3t/part-m-00001 --onto /find1/1t --target-dir  \
/find5 --class-name mytable \
--jar-file /home/user/Desktop/mytable.jar

它有效,但我需要合并所有零件文件

1 个答案:

答案 0 :(得分:0)

/find1/3t/part-m-0000*之类的证明路径不正确。请指定目录路径/find1/3t/,而不是提供文件名。

相关问题