-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLetterMapper.java
More file actions
29 lines (29 loc) · 833 Bytes
/
LetterMapper.java
File metadata and controls
29 lines (29 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//package edu.easternct.bigdata.stubs;
//import java.io.IOException;
//
//
//import org.apache.hadoop.io.IntWritable;
//import org.apache.hadoop.io.LongWritable;
//import org.apache.hadoop.io.Text;
//import org.apache.hadoop.mapreduce.Mapper;
//
//public class LetterMapper extends Mapper<LongWritable, Text, Text, IntWritable> {
//
// @Override
// public void map(LongWritable key, Text value, Context context)
// throws IOException, InterruptedException {
//
// /*
// * TODO implement
// */
// String line = value.toString();
//
// for(String word : line.split("\\W+")){
// if(word.length() > 0){
// //if it's a word it will take the first letter and map it to the length of the word.
// context.write(new Text( word.substring(0, 1)), new IntWritable(word.length()));
// }
// }
//
// }
//}