hbase压测
hbase压测
hbase压测,通过自带集成的工具PerformanceEvaluation的全名org.apache.hadoop.hbase.PerformanceEvaluation,可以在有命令行都服务上 hbase pe执行
参考链接:https://www.cnblogs.com/caoweixiong/p/13633501.html
随机写压测
hbase pe --table=randomwriteTest --nomapred --oneCon=true --valueSize=100 --compress=SNAPPY --rows=1500000 --autoFlush=true --presplit=12 randomWrite 6
#参数解释,最后的6,代表6个线程
--table #表名
--nomapred #不使用MapReduce测试,而是用多线程的方式
--oneCon #是否开启多线程测试
--valueSize #写入hbase value大小,默认为1024 Byte
--compress #压缩方式
--rows #每个线程,各种写多少行数据,
--autoFlush #是否开启自动实时flush
--presplit #表的分裂个数,我3个regionserver,就为3
随机读压测
#在进行RandomReadTest之前,需要准备数据。准备数据建议使用SequentialWriteTest。如下面的语句
hbase pe --table=randomReadTest --nomapred --oneCon=true --valueSize=100 --compress=SNAPPY --size=2 --presplit=32 sequentialWrite 16
#随机读
hbase pe --table=randomReadTest --nomapred --oneCon=true --valueSize=100 --size=2 randomRead 32

浙公网安备 33010602011771号