赞
踩
- import org.apache.hadoop.conf.Configuration;
- import org.apache.hadoop.fs.Path;
- import org.apache.hadoop.io.IntWritable;
- 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;
报红
解决
引入hadoop安装($HADOOP_HOME)目录下的
share/hadoop/common/hadoop-common-3.1.1.jar
share/hadoop/common/lib/*.jar
share/hadoop/mapreduce/*.jar
share/hadoop/hdfs/hadoop-hdfs-client-3.1.1.jar
share/hadoop/yarn/*.jar
右键你的工程,点击Properties
选择Java Build Path,,然后选择libraries,选择Add External JARs
然后选择你的jar包即可
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。