简体   繁体   English

当我运行Sort MR作业时,压缩不起作用

[英]Compression doesn't work when I run Sort MR job

I configure the hadoop-2.4.0 cluster to compress the map output and my mapred-site.xml is setted like this 我将hadoop-2.4.0集群配置为压缩地图输出,并且将mapred-site.xml设置为这样

<property>
  <name>mapreduce.map.output.compress</name>
  <value>true</value>
</property>
<property>
  <name>mapreduce.map.output.compress.codec</name>
  <value>org.apache.hadoop.io.compress.SnappyCodec</value>
</property>

When I run InvertedIndex, compression works, and I can see different Counters in "Reduce shuffle bytes" . 运行InvertedIndex时,压缩有效,并且在“减少随机字节”中可以看到不同的计数器。

However, when I run Sort, there is no different in "Reduce shuffle bytes" between with compression and without compression. 但是,当我运行Sort时,压缩和不压缩之间的“减少随机字节”没有什么不同。 This means compression doesn't work. 这意味着压缩不起作用。

It's so weird. 好奇怪 I get stuck. 我被卡住了。 Do you know what am I doing wrong? 你知道我在做什么错吗?

I think that if one of these programs has explicitly set in the Driver class (main method) the property: conf.setCompressMapOutput(false); 我认为,如果这些程序之一已在Driver类(主方法)中明确设置了属性,则该属性为: conf.setCompressMapOutput(false); , then this setting overrides the mapred-site.xml setting. ,则此设置将覆盖mapred-site.xml设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM