@@ -0,0 +1,1449 @@
+// == MaxTemperatureWithMapOutputCompression%0Aimport java.io.IOException;%0A%0Aimport org.apache.hadoop.fs.Path;%0Aimport org.apache.hadoop.io.IntWritable;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.io.compress.*;%0Aimport org.apache.hadoop.mapred.FileInputFormat;%0Aimport org.apache.hadoop.mapred.FileOutputFormat;%0Aimport org.apache.hadoop.mapred.JobClient;%0Aimport org.apache.hadoop.mapred.JobConf;%0A%0Apublic class MaxTemperatureWithMapOutputCompression %7B%0A%0A  public static void main(String%5B%5D args) throws IOException %7B%0A    if (args.length != 2) %7B%0A      System.err.println(%22Usage: MaxTemperatureWithMapOutputCompression %22 +%0A      %09%09%22%3Cinput path%3E %3Coutput path%3E%22);%0A      System.exit(-1);%0A    %7D%0A    %0A    JobConf conf = new JobConf(MaxTemperatureWithCompression.class);%0A    conf.setJobName(%22Max temperature with map output compression%22);%0A%0A    FileInputFormat.addInputPath(conf, new Path(args%5B0%5D));%0A    FileOutputFormat.setOutputPath(conf, new Path(args%5B1%5D));%0A    %0A    conf.setOutputKeyClass(Text.class);%0A    conf.setOutputValueClass(IntWritable.class);%0A    %0A    // vv MaxTemperatureWithMapOutputCompression%0A    conf.setCompressMapOutput(true);%0A    conf.setMapOutputCompressorClass(GzipCodec.class);%0A    // %5E%5E MaxTemperatureWithMapOutputCompression%0A%0A    conf.setMapperClass(MaxTemperatureMapper.class);%0A    conf.setCombinerClass(MaxTemperatureReducer.class);%0A    conf.setReducerClass(MaxTemperatureReducer.class);%0A%0A    JobClient.runJob(conf);%0A  %7D%0A%0A%7D%0A

Output Compression