In Hadoop clusters, the NameNode keeps the directory tree of all files in HDFS and locations of the files across the multiple DataNodes and the NNBench runs a test for the NameNode with some load. The NNBench NameNode benchmark is useful to check NameNode configuration with its hardware before running anything in production.
Sample Run of NNBench
hadoop jar /opt/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.1.jar nnbench -operation create_write -baseDir /user/$USER/NNBench
需要注意两点:
1. 在hdfs用户下执行
2. bloksize需要大于等于dfs.namenode.fs-limits.min-block-size
This command will create a file with 1 map and 1 reducer. You can change the options to increase the number of files, maps or reducers. For details, see the available options below.
Main Operations
- create_write: is an operation you should run at first. It creates a file(s)