如何使用linux或hdfs命令将多个实木复合地板文件合并为单个实木复合地板文件? [英] how to merge multiple parquet files to single parquet file using linux or hdfs command?
问题描述
我有多个作为蜂巢ql作业输出的小型parquet
文件,我想将输出文件合并为单个拼花地板文件吗?
I have multiple small parquet
files generated as output of hive ql job, i would like to merge the output files to single parquet file?
使用某些hdfs or linux commands
的最佳方法是什么?
what is the best way to do it using some hdfs or linux commands
?
我们曾经使用cat
命令合并文本文件,但是这对于拼花地板也适用吗?
像在spark
中使用repartition
或coalesc
方法那样编写输出文件时,是否可以使用HiveQL
本身进行操作?
we used to merge the text files using cat
command, but will this work for parquet as well?
Can we do it using HiveQL
itself when writing output files like how we do it using repartition
or coalesc
method in spark
?
推荐答案
根据此 https ://issues.apache.org/jira/browse/PARQUET-460 现在,您可以下载源代码并编译合并命令中内置的parquet-tools.
According to this https://issues.apache.org/jira/browse/PARQUET-460 Now you can download the source code and compile parquet-tools which is built in merge command.
java -jar ./target/parquet-tools-1.8.2-SNAPSHOT.jar merge /input_directory/
/output_idr/file_name
或使用 https://github.com/stripe/herringbone
这篇关于如何使用linux或hdfs命令将多个实木复合地板文件合并为单个实木复合地板文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!