educoder平台MapReduce基础实战.docxVIP

  • 7
  • 0
  • 约2.58千字
  • 约 6页
  • 2023-11-19 发布于上海
  • 举报
MapReduce 第 1 关:成绩统计过关代码: import import class WordCount { /********** Begin **********/ public static class TokenizerMapper extends MapperLongWritable, Text, Text, IntWritable { private final static IntWritable one = new IntWritable(1); private Text word = new Text(); private int maxValue = 0; public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { StringTokenizer itr = new StringTokenizer(),\n); ¥ while ()) { String[] str = ().split( ); String name = str[0]; (str[1])); (name); (word,one); } ; import class Merge { /** @param args — 对A,B 两个文件进行

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档