hadoop-mapreduce,貌似是overide,求助

问题描述

mapreduce,貌似是overide,求助

报错:
zxy@zxy-virtual-machine:/usr/hadoop/hadoop-2.4.0$ hadoop jar WordCount.jar WordCount /input /output
15/04/23 07:12:49 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
15/04/23 07:12:49 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
15/04/23 07:12:50 INFO input.FileInputFormat: Total input paths to process : 1
15/04/23 07:12:50 INFO mapreduce.JobSubmitter: number of splits:1
15/04/23 07:12:51 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local168934583_0001
15/04/23 07:12:51 WARN conf.Configuration: file:/home/zxy/hadoop_tmp/mapred/staging/zxy168934583/.staging/job_local168934583_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.
15/04/23 07:12:51 WARN conf.Configuration: file:/home/zxy/hadoop_tmp/mapred/staging/zxy168934583/.staging/job_local168934583_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.
15/04/23 07:12:52 WARN conf.Configuration: file:/home/zxy/hadoop_tmp/mapred/local/localRunner/zxy/job_local168934583_0001/job_local168934583_0001.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.
15/04/23 07:12:52 WARN conf.Configuration: file:/home/zxy/hadoop_tmp/mapred/local/localRunner/zxy/job_local168934583_0001/job_local168934583_0001.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.
15/04/23 07:12:52 INFO mapreduce.Job: The url to track the job: http://localhost:8080/
15/04/23 07:12:52 INFO mapreduce.Job: Running job: job_local168934583_0001
15/04/23 07:12:52 INFO mapred.LocalJobRunner: OutputCommitter set in config null
15/04/23 07:12:52 INFO mapred.LocalJobRunner: OutputCommitter is org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter
15/04/23 07:12:52 INFO mapred.LocalJobRunner: Waiting for map tasks
15/04/23 07:12:52 INFO mapred.LocalJobRunner: Starting task: attempt_local168934583_0001_m_000000_0
15/04/23 07:12:52 INFO mapred.Task: Using ResourceCalculatorProcessTree : [ ]
15/04/23 07:12:52 INFO mapred.MapTask: Processing split: hdfs://localhost:9000/input/data.txt:0+57
15/04/23 07:12:52 INFO mapred.MapTask: Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
15/04/23 07:12:53 INFO mapreduce.Job: Job job_local168934583_0001 running in uber mode : false
15/04/23 07:12:53 INFO mapreduce.Job: map 0% reduce 0%
15/04/23 07:12:55 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
15/04/23 07:12:55 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
15/04/23 07:12:55 INFO mapred.MapTask: soft limit at 83886080
15/04/23 07:12:55 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
15/04/23 07:12:55 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
15/04/23 07:12:55 INFO mapred.MapTask: Starting flush of map output
15/04/23 07:12:55 INFO mapred.MapTask: Spilling map output
15/04/23 07:12:55 INFO mapred.MapTask: bufstart = 0; bufend = 36; bufvoid = 104857600
15/04/23 07:12:55 INFO mapred.MapTask: kvstart = 26214396(104857584); kvend = 26214376(104857504); length = 21/6553600
15/04/23 07:12:55 INFO mapred.MapTask: Finished spill 0
15/04/23 07:12:55 INFO mapred.LocalJobRunner: map task executor complete.
15/04/23 07:12:55 WARN mapred.LocalJobRunner: job_local168934583_0001
java.lang.Exception: java.lang.ArrayIndexOutOfBoundsException: 3
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
at WordCount$TokenizerMapper.map(WordCount.java:35)
at WordCount$TokenizerMapper.map(WordCount.java:1)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
15/04/23 07:12:55 INFO mapreduce.Job: Job job_local168934583_0001 failed with state FAILED due to: NA
15/04/23 07:12:55 INFO mapreduce.Job: Counters: 0
zxy@zxy-virtual-machine:/usr/hadoop/hadoop-2.4.0$ hadoop fs -ls /output

解决方案

java.lang.Exception: java.lang.ArrayIndexOutOfBoundsException: 3
出错的在这里
你调用WordCount$TokenizerMapper.map的么
https://hadoop.apache.org/docs/r1.2.0/api/org/apache/hadoop/examples/WordCount.TokenizerMapper.html

时间: 2024-09-06 06:08:11

hadoop-mapreduce,貌似是overide,求助的相关文章

本地eclipse运行 hadoop-2.6 mapreduce 报错,求助

问题描述 本地eclipse运行 hadoop-2.6 mapreduce 报错,求助 报错信息是: 2016-02-26 11:24:07,722 INFO [main] Configuration.deprecation (Configuration.java:warnOnceIfDeprecated(1174)) - session.id is deprecated. Instead, use dfs.metrics.session-id 2016-02-26 11:24:07,727 I

Hadoop MapReduce示例程序WordCount.java手动编译运行解析

WordCount.java vi WordCount.java import java.io.IOException; import java.util.StringTokenizer; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; i

Hadoop Map-Reduce的压缩最终输出文件

Hadoop 可以在作业的Configuration对象中通过设定一系列参数来改变作业的行为,比如,我们需要进行一个map-reduce作业,并且吧最终作业reduce过程的结果输出为压缩的格式,我们可以在一般的map-reduce上进行一些定制. 实现 还是以以前做的删选最高气温的例子为参照: 以前的例子可以见这个博文:http://supercharles888.blog.51cto.com/609344/878422 我们现在要求让结果输出为压缩格式,所以保持Map类(MaxTempera

使用MRUnit,Mockito和PowerMock进行Hadoop MapReduce作业的单元测试

引言 Hadoop MapReduce作业有着独一无二的代码架构,这种代码架构拥有特定的模板和结构.这样 的架构会给测试驱动开发和单元测试带来一些麻烦.这篇文章是运用MRUnit,Mockito和PowerMock的真实范例 .我会介绍 使用MRUnit来编写Hadoop MapReduce应用程序的JUnit测试 使用PowerMock和Mockito模拟静态方法 模拟其他类型中的业务逻辑(译注:也就是编写测试驱动模块) 查看模拟的业务逻辑是否被调用(译注:测试驱动模块是否运行正常) 计数器

hadoop MapReduce实例解析

1.MapReduce理论简介 1.1 MapReduce编程模型 MapReduce采用"分而治之"的思想,把对大规模数据集的操作,分发给一个主节点管理下的各个分节点共同完成,然后通过整合各个节点的中间结果,得到最终结果.简单地说,MapReduce就是"任务的分解与结果的汇总". 在Hadoop中,用于执行MapReduce任务的机器角色有两个:一个是JobTracker:另一个是TaskTracker,JobTracker是用于调度工作的,TaskTracke

hadoop mapreduce 能帮我解决什么问题?

问题描述 hadoop mapreduce 能帮我解决什么问题? 求救... 在mapreduce下,能够进行一次map后,对map的结果进行多次reduce呢? 解决方案 可以,我觉得用迭代式的mapreduce,就是一次map-reduce以后的结果,迭代回新的一个map-reduce(我是新手,不准之处希望指正=.=)

Hadoop MapReduce编程:计算最大值

其实,使用MapReduce计算最大值的问题,和Hadoop自带的WordCount的程序没什么区别,不过在Reducer中一个是求最大值,一个是做累加,本质一样,比较简单.下面我们结合一个例子来实现. 测试数据 我们通过自己的模拟程序,生成了一组简单的测试样本数据.输入数据的格式,截取一个片段,如下所示: 01 SG 253654006139495 253654006164392 619850464 02 KG 253654006225166 253654006252433 743485698

windows eclipse 下开发hadoop mapreduce,报空指针异常。

问题描述 windows eclipse 下开发hadoop mapreduce,报空指针异常. 用三台ubuntu系统的服务器,搭建了hadoop集群,然后在windows下 用eclipse开发mapreduce,能连上hadoop,也能显示hdsf上的文件.自己写了mapreduce程序,run as hadoop 的时候,报空指针异常,什么localjob 之类的错误,什么原因求指点, 将工程打成jar包在linux hadoop环境用命令行运行是没问题的..

《R与Hadoop大数据分析实战》一2.3 Hadoop MapReduce原理

2.3 Hadoop MapReduce原理 为了更好地理解MapReduce的工作原理,我们将会: 学习MapReduce对象. MapReduce中实现Map阶段的执行单元数目. MapReduce中实现Reduce阶段的执行单元数目. 理解MapReduce的数据流. 深入理解Hadoop MapReduce. 2.3.1 MapReduce对象 由Hadoop的MapReduce技术可以引申出如下3个主要对象: Mapper:它主要用于实现MapReduce的Map阶段的操作.该对象在M