初学mapreduce,想在eclipse上配置mapreduce的环境,网上之类的教程,很多但是按照教程配之后,并不能正常运行。

碰到下面的错误:

15/10/17 20:10:39 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
15/10/17 20:10:39 WARN mapred.JobClient: No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
15/10/17 20:10:40 INFO input.FileInputFormat: Total input paths to process : 2
15/10/17 20:10:40 INFO mapred.JobClient: Running job: job_local_0001
15/10/17 20:10:40 INFO input.FileInputFormat: Total input paths to process : 2
15/10/17 20:10:41 INFO mapred.MapTask: io.sort.mb = 100
15/10/17 20:10:41 INFO mapred.MapTask: data buffer = 79691776/99614720
15/10/17 20:10:41 INFO mapred.MapTask: record buffer = 262144/327680
15/10/17 20:10:41 INFO mapred.MapTask: Starting flush of map output
15/10/17 20:10:41 INFO mapred.MapTask: Finished spill 0
15/10/17 20:10:41 INFO mapred.TaskRunner: Task:attempt_local_0001_m_000000_0 is done. And is in the process of commiting
15/10/17 20:10:41 INFO mapred.LocalJobRunner:
15/10/17 20:10:41 INFO mapred.TaskRunner: Task 'attempt_local_0001_m_000000_0' done.
15/10/17 20:10:41 INFO mapred.MapTask: io.sort.mb = 100
15/10/17 20:10:41 INFO mapred.MapTask: data buffer = 79691776/99614720
15/10/17 20:10:41 INFO mapred.MapTask: record buffer = 262144/327680
15/10/17 20:10:41 INFO mapred.MapTask: Starting flush of map output
15/10/17 20:10:41 INFO mapred.MapTask: Finished spill 0
15/10/17 20:10:41 INFO mapred.TaskRunner: Task:attempt_local_0001_m_000001_0 is done. And is in the process of commiting
15/10/17 20:10:41 INFO mapred.LocalJobRunner:
15/10/17 20:10:41 INFO mapred.TaskRunner: Task 'attempt_local_0001_m_000001_0' done.
15/10/17 20:10:41 INFO mapred.LocalJobRunner:
15/10/17 20:10:41 INFO mapred.Merger: Merging 2 sorted segments
15/10/17 20:10:41 INFO mapred.Merger: Down to the last merge-pass, with 2 segments left of total size: 52 bytes
15/10/17 20:10:41 INFO mapred.LocalJobRunner:
15/10/17 20:10:41 INFO mapred.JobClient: map 100% reduce 0%
15/10/17 20:10:42 INFO mapred.TaskRunner: Task:attempt_local_0001_r_000000_0 is done. And is in the process of commiting
15/10/17 20:10:42 INFO mapred.LocalJobRunner:
15/10/17 20:10:42 INFO mapred.TaskRunner: Task attempt_local_0001_r_000000_0 is allowed to commit now
15/10/17 20:10:42 INFO output.FileOutputCommitter: Saved output of task 'attempt_local_0001_r_000000_0' to hdfs://master:9000/user/hadoop/out99
15/10/17 20:10:42 INFO mapred.LocalJobRunner: reduce > reduce
15/10/17 20:10:42 INFO mapred.TaskRunner: Task 'attempt_local_0001_r_000000_0' done.
15/10/17 20:10:42 INFO mapred.JobClient: map 100% reduce 100%
15/10/17 20:10:42 INFO mapred.JobClient: Job complete: job_local_0001
15/10/17 20:10:42 INFO mapred.JobClient: Counters: 14
15/10/17 20:10:42 INFO mapred.JobClient: FileSystemCounters
15/10/17 20:10:42 INFO mapred.JobClient: FILE_BYTES_READ=50343
15/10/17 20:10:42 INFO mapred.JobClient: HDFS_BYTES_READ=59
15/10/17 20:10:42 INFO mapred.JobClient: FILE_BYTES_WRITTEN=102356
15/10/17 20:10:42 INFO mapred.JobClient: HDFS_BYTES_WRITTEN=24
15/10/17 20:10:42 INFO mapred.JobClient: Map-Reduce Framework
15/10/17 20:10:42 INFO mapred.JobClient: Reduce input groups=3
15/10/17 20:10:42 INFO mapred.JobClient: Combine output records=4
15/10/17 20:10:42 INFO mapred.JobClient: Map input records=2
15/10/17 20:10:42 INFO mapred.JobClient: Reduce shuffle bytes=0
15/10/17 20:10:42 INFO mapred.JobClient: Reduce output records=3
15/10/17 20:10:42 INFO mapred.JobClient: Spilled Records=8
15/10/17 20:10:42 INFO mapred.JobClient: Map output bytes=40
15/10/17 20:10:42 INFO mapred.JobClient: Combine input records=4
15/10/17 20:10:42 INFO mapred.JobClient: Map output records=4
15/10/17 20:10:42 INFO mapred.JobClient: Reduce input records=4

运行程序为hadoop自带的WordCount.java源代码

  1.在WordCount.java上右键导出jar文件到工程的根目录下。

  2.将导出的wordcount.jar文件,右键加入到buildpath。

  3.在源代码中加入

..................
public static void main(String[] args) throws Exception {
Configuration conf = new Configuration();
conf.set("mapred.job.tracker", "192.168.2.1:9001");
String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
if (otherArgs.length != 2) {
System.err.println("Usage: wordcount <in> <out>");
System.exit(2);
}
Job job = new Job(conf, "word count");
job.setJarByClass(WordCount.class);
job.setMapperClass(TokenizerMapper.class);
job.setCombinerClass(IntSumReducer.class);
job.setReducerClass(IntSumReducer.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(IntWritable.class);
FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
FileOutputFormat.setOutputPath(job, new Path(otherArgs[1]));
System.exit(job.waitForCompletion(true) ? 0 : 1);
}
.....................

eclipse 配置mapreduce环境出错的更多相关文章

  1. 09 eclipse配置maven环境

    eclipse配置maven环境 一.打开eclipse:Window>>Preferences: 二.搜索:"maven",然后点击:"Installati ...

  2. eclipse配置javaee环境

    笔者开发javaee项目时惯用myeclipse,但由于个人笔记本性能较低,myeclipse对内存的消耗极大,所以考虑换成eclipse开发.本文介绍eclipse配置javaee开发环境的一些体会 ...

  3. Eclipse配置maven环境

    一.什么是maven? Maven是一个项目管理工具,它包含了一个项目对象模型 (Project Object Model),一组标准集合,一个项目生命周期(Project Lifecycle),一个 ...

  4. Java归去来第1集:手动给Eclipse配置Maven环境

    一.Eclipse配置Maven 1.1.下载Maven http://maven.apache.org/download.cgi,选择对应的版本,window下载apache-maven-3.5.3 ...

  5. eclipse 配置python环境 json 插件

    windows->install new software add 配置python 环境: name:pydev(可随意写) url:http://pydev.org/updates/ (如果 ...

  6. Eclipse配置maven环境1

    一.什么是maven? Maven是一个项目管理工具,它包含了一个项目对象模型 (Project Object Model),一组标准集合,一个项目生命周期(Project Lifecycle),一个 ...

  7. ubuntu安装eclipse配置jdk环境

    $ sudo mkdir /usr/local/java //在此目录下新建一个文件夹java $ sudo mv 下载/jdk-8u111-linux-i586.tar.gz /usr/local/ ...

  8. 【安装eclipse, 配置java环境教程】 编写第一个java程序

    写java通常用eclipse编写,还有一款编辑器比较流行叫IJ.这里我们只说下eclipse编写java的前期工作. 在安装eclipse之前要下载java的sdk文件,即java SE:否则无法运 ...

  9. Ubuntu下的eclipse配置MapReduce

    下载配置文件: 链接:https://pan.baidu.com/s/13vatPHpDP5HaW0mKuHydUA提取码:pjxi 1)启动hadoop cd /usr/local/hadoop . ...

随机推荐

  1. 利用backgroundwork----递归读取网页源代码,并下载href链接中的文件

    今天闲着没事,研究了一下在线更新程序版本的问题.也是工作中的需要,开始不知道如何下手,各种百度也没有找到自己想要的,因为我的需求比较简单,所以就自己琢磨了一下.讲讲我的需求吧.自己在IIs上发布了一个 ...

  2. DataGridView添加一行数据、全选、取消全选、清空数据、删除选中行

    .net 2005下的Windows Form Application,一个DataGridView控件和4个Button,界面设置如下:         代码如下,有注解,相信大家都看得明白:   ...

  3. 如何创建一个自己的.NET Core Global Tools

    索引 NET Core应用框架之BitAdminCore框架应用篇系列 框架演示:https://www.bitadmincore.com 框架源码:https://github.com/chenyi ...

  4. JgrId 无数据返回设置

    在addJSONData方法中 while (i < len) { 前增加以下代码 ) { rowData.push('<tr role="row" id=" ...

  5. .NET处理HTTP请求

    第一种:使用HttpWebRequest string result = ""; HttpWebRequest request = (HttpWebRequest)WebReque ...

  6. uwp获取版本信息win10 VersionInfo

    using Windows.System.Profile; Después vamos a agregar una propiedad que va a contener un mensaje con ...

  7. C#中Cookies的读取

    C#中Cookies的读取   链接: 一 .写入Cookie 1. Name 和 Value 属性由程序设定,默认值都是空引用. 2. Domain属性的默认值为当前URL的域名部分,不管发出这个c ...

  8. Python面向对象(self参数、封装)

    day24 面向对象三大特性:封装 self参数 class Bar: def foo(self, arg): print(self, arg) x = Bar() print(x) x.foo(11 ...

  9. mysql 主从错误以及监控

    同步中的常见的错误和处理 1.现象:在从库上面show slave status\G;出现下列情况,           Slave_IO_Running: Yes           Slave_S ...

  10. Unable to access 'default.path.data' (/var/lib/elasticsearch)