728x90 콤퓨타/Hadoop2 0.20.2 버전에서의 소스 기본 템플릿 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sssp_hadoop;import java.io.IOException; import java.util.StringTokenizer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.. 2013. 2. 20. 리듀스의 출력이 Text, Text 일 때, 알파벳 역순으로 출력되게 하는 Comparator 리듀스의 출력이 Text, Text 일 때, 알파벳 역순으로 출력되게 하는 Comparator출처 : http://pkghosh.wordpress.com/2011/04/13/map-reduce-secondary-sort-does-it-all/ public static class KeyComprator extends WritableComparator {02 03 protected KeyComprator() {04 super(Text.class, true);05 }06 07 @Override08 public int compare(WritableComparable w1, WritableComparable w2) {09 10//ascending zone and day11 12Text t1 = (Text) w1;.. 2013. 2. 20. 이전 1 다음 728x90