大数据hive_mr压缩问题

Hive中压缩的设置:注意 本质还是指的是MapReduce的压缩

--设置Hive的中间压缩 也就是map的输出压缩

1)开启 hive 中间传输数据压缩功能

set hive.exec.compress.intermediate=true;

2)开启 mapreduce 中 map 输出压缩功能

set mapreduce.map.output.compress=true;

3)设置 mapreduce 中 map 输出数据的压缩方式

set mapreduce.map.output.compress.codec = org.apache.hadoop.io.compress.SnappyCodec;

--设置Hive的最终输出压缩,也就是Reduce输出压缩

1)开启 hive 最终输出数据压缩功能

set hive.exec.compress.output=true;

2)开启 mapreduce 最终输出数据压缩

set mapreduce.output.fileoutputformat.compress=true;

3)设置 mapreduce 最终数据输出压缩方式

set mapreduce.output.fileoutputformat.compress.codec =org.apache.hadoop.io.compress.SnappyCodec;

4)设置 mapreduce 最终数据输出压缩为块压缩 还可以指定RECORD

set mapreduce.output.fileoutputformat.compress.type=BLOCK;

相关推荐
SelectDB16 小时前
秒级弹性、最高降本 70%:SelectDB Serverless 如何重塑云数仓资源效率
大数据·后端·云原生
WhoAmI16 小时前
MapReduce框架原理解析一:InputFormat
大数据·hadoop
WhoAmI16 小时前
MapReduce框架原理解析三:OutputFormat
大数据·hadoop
WhoAmI16 小时前
MapReduce框架原理解析二:Shuffle
大数据·hadoop
大大大大晴天2 天前
Hudi技术内幕:Key Generation原理与实践
大数据
得物技术5 天前
从埋点需求到规则资产:Hermes Agent 重构得物数仓工作流
大数据·llm·ai编程
久美子5 天前
AI驱动数仓建设的Harness工程实践——本体建模、知识分层与上下文工程
大数据
大树886 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai
大志哥1236 天前
ES和Logstash日志链路系统上线后遭遇切片爆炸(解决)
大数据·elasticsearch
果丁智能6 天前
物联网智能锁赋能集中式住宿:身份核验与远程权限管控的全链路技术实践
大数据·人工智能·物联网·智能家居