Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public class JoinMapper extends Mapper<LongWritable, Text, Text, Text> {
  2. private Text keyEmit = new Text();
  3. private Text valEmit = new Text();
  4. public void map(LongWritable k, Text value, Context context) throws IOException, InterruptedException
  5. {
  6. String line=value.toString();
  7. String[] words=line.split(",");
  8. keyEmit.set(words[0]);
  9. valEmit.set(words[1]);
  10. context.write(keyEmit, valEmit);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement