Hadoop之mrbench

本文介绍如何使用MRBench工具来测试Hadoop MapReduce任务的性能。通过设置不同参数,如每文件100,000行、1,000个Mapper、200个Reducer,并执行200次,可以评估系统的执行效率。
摘要由CSDN通过智能技术生成

需求:

需要测试机器mr的执行性能,那么可以通过mrbench进行测试

语法:

 

bin/hadoop jar share/hadoop/mapreduceX/hadoop-test-XXX.jar mrbench
[-baseDir <base DFS path for output/input, default is /benchmarks/MRBench>]
[-jar <local path to job jar file containing Mapper and Reducer implementations, default is current jar file>] 
[-numRuns <number of times to run the job, default is 1>]
[-maps <number of maps for each run, default is 2>] 
[-reduces <number of reduces for each run, default is 1>] 
[-inputLines <number of input lines to generate, default is 1>] 
[-inputType <type of input to generate, one of ascending (default), descending, random>]
[-verbose]

需求:

 

生成每个文件100000行,1000个mapper,200个reducer,执行200次:

 

bin/hadoop jar share/hadoop/mapreduceX/hadoop-test-XXX.jar mrbench -numRuns 200 -inputLines 100000 -maps 1000 -reduces 200

汇总信息:

 

DataLines       Maps    Reduces AvgTime (milliseconds)
100000          1000      200      28522

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值