Commit 82e32dfa authored by tian's avatar tian

sdf

parent 75e3d18d
......@@ -24,9 +24,11 @@ public class WordCount extends Configured implements Tool {
throws IOException, InterruptedException {
String line = value.toString();
String[] words = line.split("\\s+");
for(String word : words)
// String[] words = line.split(" ");
for(String word : words) {
textValue.set(word);
context.write(textValue, ONE);
context.write(textValue, ONE);
}
}
}
static class WCReducer extends Reducer<Text, IntWritable, Text, IntWritable> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment