【Hadoop十五】Hadoop Counter

本文详细探讨了Hadoop Counters在MapReduce作业中的应用,包括只包含Map任务的作业和同时包含Map与Reduce任务的作业。通过实例解析Counter如何在不同阶段跟踪和统计关键指标。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

 1. 只有Map任务的Map Reduce Job

	File System Counters
		FILE: Number of bytes read=3629530
		FILE: Number of bytes written=98312
		FILE: Number of read operations=0
		FILE: Number of large read operations=0
		FILE: Number of write operations=0
		HDFS: Number of bytes read=8570654
		HDFS: Number of bytes written=1404469
		HDFS: Number of read operations=6
		HDFS: Number of large read operations=0
		HDFS: Number of write operations=2
	Job Counters 
		Launched map tasks=1
		Data-local map tasks=1
		Total time spent by all maps in occupied slots (ms)=14522
		Total time spent by all reduces in occupied slots (ms)=0
		Total time spent by all map tasks (ms)=14522
		Total vcore-seconds taken by all map tasks=14522
		Total megabyte-seconds taken by all map tasks=14870528
	Map-Reduce Framework
		Map input records=7452
		Map output records=7452
		Input split bytes=146
		Spilled Records=0
		Failed Shuffles=0
		Merged Map outputs=0
		GC time elapsed (ms)=241
		CPU time spent (ms)=9750
		Physical memory (bytes) snapshot=184406016
		Virtual memory (bytes) snapshot=893657088
		Total committed heap usage (bytes)=89653248
	File Input Format Counters 
		Bytes Read=8570508
	File Output Format Counters 
		Bytes Written=1404469

 

2. 既有Map又有Reduce的MapReduce Job

 

	File System Counters
		FILE: Number of bytes read=879582
		FILE: Number of bytes written=198227
		FILE: Number of read operations=0
		FILE: Number of large read operations=0
		FILE: Number of write operations=0
		HDFS: Number of bytes read=2729649
		HDFS: Number of bytes written=265
		HDFS: Number of read operations=7
		HDFS: Number of large read operations=0
		HDFS: Number of write operations=2
	Job Counters 
		Launched map tasks=1
		Launched reduce tasks=1
		Data-local map tasks=1
		Total time spent by all maps in occupied slots (ms)=7071
		Total time spent by all reduces in occupied slots (ms)=7804
		Total time spent by all map tasks (ms)=7071
		Total time spent by all reduce tasks (ms)=7804
		Total vcore-seconds taken by all map tasks=7071
		Total vcore-seconds taken by all reduce tasks=7804
		Total megabyte-seconds taken by all map tasks=7240704
		Total megabyte-seconds taken by all reduce tasks=7991296
	Map-Reduce Framework
		Map input records=20
		Map output records=1
		Map output bytes=167
		Map output materialized bytes=182
		Input split bytes=139
		Combine input records=1
		Combine output records=1
		Reduce input groups=1
		Reduce shuffle bytes=182
		Reduce input records=1
		Reduce output records=1
		Spilled Records=2
		Shuffled Maps =1
		Failed Shuffles=0
		Merged Map outputs=1
		GC time elapsed (ms)=122
		CPU time spent (ms)=3620
		Physical memory (bytes) snapshot=451244032
		Virtual memory (bytes) snapshot=1823916032
		Total committed heap usage (bytes)=288882688
	Shuffle Errors
		BAD_ID=0
		CONNECTION=0
		IO_ERROR=0
		WRONG_LENGTH=0
		WRONG_MAP=0
		WRONG_REDUCE=0
	File Input Format Counters 
		Bytes Read=2729510
	File Output Format Counters 
		Bytes Written=265

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值