赞
踩
windows配置idea的教程:
https://blog.csdn.net/qq_40343117/article/details/100351273
mapreduce运行原理解析(写代码之前最好记住这些框架,否则不是很好记忆):
https://blog.csdn.net/qq_40343117/article/details/100079532
我们使用IDEA运行mapreduce可以又来宁波各种方法,直接在windows运行,或者导出jar包在hadoop集群运行,这里哦我都会介绍,首先是第一种在Windows运行。
统计相同单词出现的次数
import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import java.io.IOException; import java.util.Iterator; public class D03 { public static class Mapp extends Mapper<LongWritable,Text,Text,IntWritable>{ @Override protected void map(LongWritable ke
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。