我想使用sqoop导入从Cobol-DB2导入数据,但我的要求是我要使用4个映射器,但它应该在hdfs目标目录中仅创建一个文件。有什么办法吗?
答案 0 :(得分:0)
我认为Sqoop是不可能的,但是您可以随后使用HDFS命令合并目录,如下所示
-getmerge [-nl] <src> <localdst> :
Get all the files in the directories that match the source file pattern and
merge and sort them to only one file on local fs. <src> is kept.
作为示例
hdfs dfs -getmerge -nl /user/dir/cobol /user/dir/cobol_merged