问题描述
- 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