模板网站和定制网站的区别是什么,技术支持 深圳网站建设贝尔利,重庆网站建设 红旗河沟,wordpress浮动广告ZSTD#xff08;全称为Zstandard#xff09;是一种开源的无损数据压缩算法#xff0c;其压缩性能和压缩比均优于当前Hadoop支持的其他压缩格式#xff0c;本特性使得Hive支持ZSTD压缩格式的表。Hive支持基于ZSTD压缩的存储格式有常见的ORC#xff0c;RCFile#xff0c;Te…ZSTD全称为Zstandard是一种开源的无损数据压缩算法其压缩性能和压缩比均优于当前Hadoop支持的其他压缩格式本特性使得Hive支持ZSTD压缩格式的表。Hive支持基于ZSTD压缩的存储格式有常见的ORCRCFileTextFileJsonFileParquetSquenceCSV。
ZSTD压缩格式的建表方式如下
ORC存储格式建表时可指定TBLPROPERTIES(“orc.compress”“zstd”)
create table tab_1(...) stored as orc TBLPROPERTIES(orc.compresszstd);Parquet存储格式建表可指定TBLPROPERTIES(“parquet.compression”“zstd”)
create table tab_2(...) stored as parquet TBLPROPERTIES(parquet.compressionzstd);其他格式或通用格式建表可执行设置参数指定compress,codec为“org.apache.hadoop.io.compress.ZStandardCode” set hive.exec.compress.outputtrue;set mapreduce.map.output.compresstrue;set mapreduce.map.output.compress.codecorg.apache.hadoop.io.compress.ZStandardCodec;set mapreduce.output.fileoutputformat.compresstrue;set mapreduce.output.fileoutputformat.compress.codecorg.apache.hadoop.io.compress.ZStandardCodec;set hive.exec.compress.intermediatetrue;create table tab_3(...) stored as textfile;说明 ZSTD压缩格式的表和其他普通压缩表的SQL操作没有区别可支持正常的增删查及聚合类SQL操作。 写出的文件使用zstd压缩spark3才开始支持 –conf spark.sql.parquet.compression.codeczstd