I want to implement order by like clause in my Map Reduce program.
My input looks like this
1,Subhradip Bose,1
2,Prajakta Bose,2
2,Anup Singh,3
3,Mahesh Gurav,4
I have written a map function which looks like
protected void map(LongWritable key, Text value, Context context)
throws IOException, InterruptedException {
String[] currentLine = value.toString().split(",");
context.write(new Text(currentLine[1]), new Text(currentLine[1]));
}
But I am getting the output like this
Subhradip Bose
Prajakta Bose
Anup Singh
Mahesh Gurav
I want the output like the following
Anup Singh
Mahesh Gurav
Prajakta Bose
Subhradip Bose