Hadoop小兵笔记【五】hadoop2.2.0伪分布式环境搭建疑难-第一个用例wordcount失败

问题现象

There are 1 datanode(s) running and no node(s) are excluded in this operation.

问题原因

mapred-site.xml文件的配置
由于参考了之前研究生阶段下载的资料,按照真分布式环境一步步配置,觉得只是将datanode同时存放在namenode,将hdfs-site.xml文件中的dfs.replication的值设置为1而已,应该也能运行起来。
百度各种hadoop2.2.0分布式搭建攻略,也尝试了其他方法,比如修改mapred-queues.xml等,最后发现是需要修改mapred-site.xml才会运行成功。

问题解决

参考CSDN-er博文:Hadoop2.2.0版本多节点集群安装及测试
这里写图片描述

这里写图片描述

wordcount运行成功

运行前准备

运行成功结果

【运行中间过程详情】
17/07/26 22:23:08 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
17/07/26 22:23:08 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
17/07/26 22:23:09 INFO input.FileInputFormat: Total input paths to process : 1
17/07/26 22:23:09 INFO mapreduce.JobSubmitter: number of splits:1
17/07/26 22:23:09 INFO Configuration.deprecation: user.name is deprecated. Instead, use mapreduce.job.user.name
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.output.value.class is deprecated. Instead, use mapreduce.job.output.value.class
17/07/26 22:23:09 INFO Configuration.deprecation: mapreduce.combine.class is deprecated. Instead, use mapreduce.job.combine.class
17/07/26 22:23:09 INFO Configuration.deprecation: mapreduce.map.class is deprecated. Instead, use mapreduce.job.map.class
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.job.name is deprecated. Instead, use mapreduce.job.name
17/07/26 22:23:09 INFO Configuration.deprecation: mapreduce.reduce.class is deprecated. Instead, use mapreduce.job.reduce.class
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.output.dir is deprecated. Instead, use mapreduce.output.fileoutputformat.outputdir
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.output.key.class is deprecated. Instead, use mapreduce.job.output.key.class
17/07/26 22:23:09 INFO Configuration.deprecation: mapred.working.dir is deprecated. Instead, use mapreduce.job.working.dir
17/07/26 22:23:09 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_local1749311414_0001
17/07/26 22:23:09 WARN conf.Configuration: file:/usr/local/hadoop/hadoop-2.2.0/tmp/mapred/staging/root1749311414/.staging/job_local1749311414_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.
17/07/26 22:23:09 WARN conf.Configuration: file:/usr/local/hadoop/hadoop-2.2.0/tmp/mapred/staging/root1749311414/.staging/job_local1749311414_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.
17/07/26 22:23:10 WARN conf.Configuration: file:/usr/local/hadoop/hadoop-2.2.0/tmp/mapred/local/localRunner/root/job_local1749311414_0001/job_local1749311414_0001.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.
17/07/26 22:23:10 WARN conf.Configuration: file:/usr/local/hadoop/hadoop-2.2.0/tmp/mapred/local/localRunner/root/job_local1749311414_0001/job_local1749311414_0001.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.
17/07/26 22:23:10 INFO mapreduce.Job: The url to track the job: http://localhost:8080/
17/07/26 22:23:10 INFO mapreduce.Job: Running job: job_local1749311414_0001
17/07/26 22:23:10 INFO mapred.LocalJobRunner: OutputCommitter set in config null
17/07/26 22:23:10 INFO mapred.LocalJobRunner: OutputCommitter is org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter
17/07/26 22:23:10 INFO mapred.LocalJobRunner: Waiting for map tasks
17/07/26 22:23:10 INFO mapred.LocalJobRunner: Starting task: attempt_local1749311414_0001_m_000000_0
17/07/26 22:23:10 INFO mapred.Task: Using ResourceCalculatorProcessTree : [ ]
17/07/26 22:23:10 INFO mapred.MapTask: Processing split: hdfs://Master:9000/data/input/wordcountTest:0+135
17/07/26 22:23:10 INFO mapred.MapTask: Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
17/07/26 22:23:10 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
17/07/26 22:23:10 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
17/07/26 22:23:10 INFO mapred.MapTask: soft limit at 83886080
17/07/26 22:23:10 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
17/07/26 22:23:10 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
17/07/26 22:23:10 INFO mapred.LocalJobRunner:
17/07/26 22:23:10 INFO mapred.MapTask: Starting flush of map output
17/07/26 22:23:10 INFO mapred.MapTask: Spilling map output
17/07/26 22:23:10 INFO mapred.MapTask: bufstart = 0; bufend = 178; bufvoid = 104857600
17/07/26 22:23:10 INFO mapred.MapTask: kvstart = 26214396(104857584); kvend = 26214340(104857360); length = 57/6553600
17/07/26 22:23:10 INFO mapred.MapTask: Finished spill 0
17/07/26 22:23:10 INFO mapred.Task: Task:attempt_local1749311414_0001_m_000000_0 is done. And is in the process of committing
17/07/26 22:23:10 INFO mapred.LocalJobRunner: map
17/07/26 22:23:10 INFO mapred.Task: Task ‘attempt_local1749311414_0001_m_000000_0’ done.
17/07/26 22:23:10 INFO mapred.LocalJobRunner: Finishing task: attempt_local1749311414_0001_m_000000_0
17/07/26 22:23:10 INFO mapred.LocalJobRunner: Map task executor complete.
17/07/26 22:23:10 INFO mapred.Task: Using ResourceCalculatorProcessTree : [ ]
17/07/26 22:23:10 INFO mapred.Merger: Merging 1 sorted segments
17/07/26 22:23:10 INFO mapred.Merger: Down to the last merge-pass, with 1 segments left of total size: 129 bytes
17/07/26 22:23:10 INFO mapred.LocalJobRunner:
17/07/26 22:23:10 INFO Configuration.deprecation: mapred.skip.on is deprecated. Instead, use mapreduce.job.skiprecords
17/07/26 22:23:11 INFO mapred.Task: Task:attempt_local1749311414_0001_r_000000_0 is done. And is in the process of committing
17/07/26 22:23:11 INFO mapred.LocalJobRunner:
17/07/26 22:23:11 INFO mapred.Task: Task attempt_local1749311414_0001_r_000000_0 is allowed to commit now
17/07/26 22:23:11 INFO output.FileOutputCommitter: Saved output of task ‘attempt_local1749311414_0001_r_000000_0’ to hdfs://Master:9000/output/wordcount/_temporary/0/task_local1749311414_0001_r_000000
17/07/26 22:23:11 INFO mapred.LocalJobRunner: reduce > reduce
17/07/26 22:23:11 INFO mapred.Task: Task ‘attempt_local1749311414_0001_r_000000_0’ done.
17/07/26 22:23:11 INFO mapreduce.Job: Job job_local1749311414_0001 running in uber mode : false
17/07/26 22:23:11 INFO mapreduce.Job: map 100% reduce 100%
17/07/26 22:23:11 INFO mapreduce.Job: Job job_local1749311414_0001 completed successfully
17/07/26 22:23:11 INFO mapreduce.Job: Counters: 32
File System Counters
FILE: Number of bytes read=540918
FILE: Number of bytes written=935238
FILE: Number of read operations=0
FILE: Number of large read operations=0
FILE: Number of write operations=0
HDFS: Number of bytes read=270
HDFS: Number of bytes written=98
HDFS: Number of read operations=15
HDFS: Number of large read operations=0
HDFS: Number of write operations=4
Map-Reduce Framework
Map input records=11
Map output records=15
Map output bytes=178
Map output materialized bytes=144
Input split bytes=108
Combine input records=15
Combine output records=10
Reduce input groups=10
Reduce shuffle bytes=0
Reduce input records=10
Reduce output records=10
Spilled Records=20
Shuffled Maps =0
Failed Shuffles=0
Merged Map outputs=0
GC time elapsed (ms)=0
CPU time spent (ms)=0
Physical memory (bytes) snapshot=0
Virtual memory (bytes) snapshot=0
Total committed heap usage (bytes)=436731904
File Input Format Counters
Bytes Read=135
File Output Format Counters
Bytes Written=98
root@Master:/usr/local/hadoop/hadoop-2.2.0/sbin# hadoop fs -cat /output/wordcount/part-r-00000 |head
chengzhi 1
feiyang 4
taoxin 1
wanglin 2
wangliu 1
wei 1
zhangbo 2
zhanglin 1
zhao 1
zhaoqingwei 1
root@Master:/usr/local/hadoop/hadoop-2.2.0/sbin# vim mapred-site.xml

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值