标签:snap 数据 img term compress apache file 语句 format
****几个配置方式:
>>>MR程序
>>>mapred-site.xml
>>>hive命令行
1.Map端数据输出压缩
set hive.exec.compress.intermediate = true;
set mapreduce.map.output.compress = true;
set mapreduce.map.output.compress.codec = org.apache.hadoop.io.compress.SnappyCodec;
2.Reduce端数据输出压缩
set hive.exec.compress.output = true;
set mapreduce.output.fileoutputformat.compress = true;
set mapreduce.output.fileoutputformat.compress.codec = org.apache.hadoop.io.compress.SnappyCodec;
然后在hive 执行sql语句即可,
可以在yarn的日志页面看到该job的运行参数,明显已经发生了变化:
标签:snap 数据 img term compress apache file 语句 format
原文地址:https://www.cnblogs.com/chensm/p/9936668.html