secondary-sort

Hadoop M/R secondary sort not working, bases on last name of the user

本小妞迷上赌 提交于 2019-12-11 10:42:50
问题 I want to sort the output based on lastname of the user, the key being used is firstName. Following are the classes which i am using but i am not getting sorted output based on lastName. I am new to hadoop,this i wrote using help from various internet sources. Main Class :- public class WordCount { public static class Map extends Mapper<LongWritable, Text, CustomKey, Text> { public static final Log log = LogFactory.getLog(Map.class); private final static IntWritable one = new IntWritable(1);