运行hadoop时的一些技巧
//用来给key分区的,需要实现Partitioner接口
??conf.setPartitionerClass(Partitioner.class);
??//分组,跟分区不同
??conf.setOutputValueGroupingComparator(theClass);
??//中间合并程序,一般跟reduce类似
??conf.setCombinerClass(ComReduce.class);
//对结果中的 key 进行排序时的使用的比较器,默认使用的是WritableComparable ,如对hadoop自带的wordcount
//程序,默认的比较器是按升序排序的,但我们往往需要用到的是降序,这时可以利用这个方法。
//参考:http://blog.chinaunix.net/u3/99156/showart_2157576.html
更多信息请查看?java进阶网?http://www.javady.com