声明:许多小伙伴私信我,需要trackinfo_20130721.data,可以通过百度云 链接:https://pan.baidu.com/s/1aVpU3k3mddyaIkmXPmwnrg 提取码:nilv 来获取,或者可以从我的csdn资源中下载。 这是代码
package project.mr;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
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;
/**
* 第一版本浏览量统计
*/
public class PVStatApp {
public static void main(String[] args) throws Exception{
Configuration configuration = new Configuration();
Job job = Job.getInstance(config