Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
- String line = value.toString();
- String[] lineArray = line.split(",");
- String lastWord = lineArray[lineArray.length - 1];
- String[] genreArray = lastWord.split("\\|");
- for (String genre_value : genreArray) {
- word.set(genre_value);
- context.write(word, one);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement