《Hadoop The Definitive Guide》ch10 Administering Hadoop

Hadoop集群测试与管理
本文介绍了Hadoop集群上的基准测试程序,包括读写性能测试、文件系统一致性检查等,并展示了如何通过命令行操作安全模式及启动负载均衡器。同时提供了Hadoop相关组件的Web界面监控地址。

1. 集群基准测试程序

c01s02h01ate1:nomad2 # hadoop jar /local/hadoop/hadoop-0.20.203.0/hadoop-test-0.20.203.0.jar 
An example program must be given as the first argument.
Valid program names are:
  DFSCIOTest: Distributed i/o benchmark of libhdfs.
  DistributedFSCheck: Distributed checkup of the file system consistency.
  MRReliabilityTest: A program that tests the reliability of the MR framework by injecting faults/failures
  TestDFSIO: Distributed i/o benchmark.
  dfsthroughput: measure hdfs throughput
  filebench: Benchmark SequenceFile(Input|Output)Format (block,record compressed and uncompressed), Text(Input|Output)Format (compressed and uncompressed)
  loadgen: Generic map/reduce load generator
  mapredtest: A map/reduce test check.
  mrbench: A map/reduce benchmark that can create many small jobs
  nnbench: A benchmark that stresses the namenode.
  testarrayfile: A test for flat files of binary key/value pairs.
  testbigmapoutput: A map/reduce program that works on a very big non-splittable file and does identity map/reduce
  testfilesystem: A test for FileSystem read/write.
  testipc: A test for ipc.
  testmapredsort: A map/reduce program that validates the map-reduce framework's sort.
  testrpc: A test for rpc.
  testsequencefile: A test for flat files of binary key value pairs.
  testsequencefileinputformat: A test for sequence file input format.
  testsetfile: A test for flat files of binary key/value pairs.
  testtextinputformat: A test for text input format.
  threadedmapbench: A map/reduce benchmark that compares the performance of maps with multiple spills over maps with 1 spill

c01s02h01ate1:nomad2 # hadoop jar /local/hadoop/hadoop-0.20.203.0/hadoop-test-0.20.203.0.jar DFSCIOTest
TestDFSIO.0.0.4
Usage: TestDFSIO -read | -write | -clean [-nrFiles N] [-fileSize MB] [-resFile resultFileName] [-bufferSize Bytes] 

2.  safe mode

c01s02h01ate1:nomad2 # hadoop dfsadmin -safemode get
Safe mode is OFF
c01s02h01ate1:nomad2 # hadoop dfsadmin -refreshNodes

3.  web界面

http://c01s0201ate2:50075/blockScannerReport

http://c01s0201ate1:50030/logLevel?log=org.apache.hadoop.mapred.JobTracker

http://c01s0201ate1:50030/stacks

4. 负载平衡

c01s02h01ate1:nomad2 # start-balancer.sh 
starting balancer, logging to /local/hadoop/hadoop-0.20.203.0/bin/../logs/hadoop-nomad2-balancer-c01s02h01ate1.out
Time Stamp               Iteration#  Bytes Already Moved  Bytes Left To Move  Bytes Being Moved
The cluster is balanced. Exiting...
Balancing took 413.0 milliseconds

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值