package com.diit;
import com.dait.UserRateBean;
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 org.codehaus.jackson.map.ObjectMapper;
import org.apache.hadoop.conf.Configuration;
import java.io.IOException;
import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;
public class MovieHotOne {
public static class MovieHotOneMap extends Mapper<LongWritable, Text,Text, IntWritable>{
//重新定义
ObjectMapper objectMapper = new ObjectMapper();
重写map方法 快捷键:Ctrl + s + o
@Override
protected void map(LongWrita
Hadoop查找文件中最受欢迎的电影(评论最多)
最新推荐文章于 2021-03-02 14:47:27 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)