I added following properties in mapred-site.xml file for compressing my map files.
<property>
<name>mapred.compress.map.output</name>
<value>true</value>
</property>
<property>
<name>mapred.map.output.compression.codec</name>
<value>org.apache.hadoop.io.compress.SnappyCodec</value>
</property>
It's giving an Error of snappy_library not loaded.I think I'll have to install it before using the codecs.Kindly help.