太难了!!有没有大佬教教我!!!!!Eclipse根本没什么反应!!!!
1条回答 默认 最新
MelodyYN 2021-12-21 19:24关注啥年代了还用eclipse,
骚年,试试idea吧
真香package com.hpu.hadoop.test; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; import java.io.IOException; /** * @author zyn * @version 1.0 */ public class TMapper extends Mapper<LongWritable, Text,Text, NullWritable> { private int lineNum = 0; @Override protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException { lineNum++; context.write(value,NullWritable.get()); } @Override protected void cleanup(Context context) throws IOException, InterruptedException { System.out.println("------------"+lineNum); } }评论 打赏 举报 编辑记录解决 1无用