Hive格式各种格式下不同压缩算法的比较

原始Text格式的hive分区大小为119.2G。

压缩算法

Text格式

Parquet格式

ORC

RCFile

不压缩

119.2G

54.1G

20.0G

98G

Snappy压缩

30.2 G

23.6

13.6

27.0G

Gzip压缩

18.8 G

14.1 G

不支持

15.2G

ZLIB压缩

不支持

不支持

10.1G

不支持

注意:我们集群现在hive设置默认snappy压缩,而parquet的压缩格式设置为parquet.compression=snappy,以前setmapred.output.compression=org.apache.hadoop.io.compress.SnappyCodec不起作用。

Orc的压缩格式设置方法为:orc.compress=SNAPPY,默认为ZLIB.

转自:https://blog.csdn.net/houzhizhen/article/details/53101237

原文地址:https://www.cnblogs.com/duanxz/p/9156358.html