Open kalyanhadooptraining opened 6 years ago
this is my job1 output..
DE 4118 FR 1411 GB 5518 US 16348
so i have written mapper like the code given below
public class Job2Mapper extends Mapper<LongWritable, Text, Text, IntWritable> {
@Override
protected void map(LongWritable key, Text value,
Context context)
throws IOException, InterruptedException {
String line = value.toString();
System.out.println("Line: " + line);
String[] words = line.split("\\t");
Text country = new Text(words[0]);
int status = Integer.parseInt(words[1]);
IntWritable st = new IntWritable(Integer.valueOf(status));
context.write(country, st);
}
but 1.i have to insert code to filter top 10 countries in mapper.. can any one give me suggestion. and
working on to get top 10 countries based on status "success"