Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FirstJobMapper extends Mapper<LongWritable, Text, Text, Text> {
- public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
- String record = value.toString();
- String[] parts = record.split(",");
- if (!parts[0].equals("RIDE_ID") && !parts[5].isEmpty()) {
- Text carCategory = new Text(parts[12]);
- Text distance = new Text(parts[5]);
- context.write(carCategory, distance);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement