HBase基准测试

时间:2022-07-24
本文章向大家介绍HBase基准测试,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

HBase Performance Evaluation

su hdfs ./hbase org.apache.hadoop.hbase.PerformanceEvaluation sequentialWrite 1

            Elapsed time in milliseconds=26672
            Row count=1048576

su hdfs ./hbase org.apache.hadoop.hbase.PerformanceEvaluation sequentialRead 1

            Elapsed time in milliseconds=227972
            Row count=1048576

su hdfs ./hbase org.apache.hadoop.hbase.PerformanceEvaluation randomWrite 1

         Elapsed time in milliseconds=15852
            Row count=1048576

su hdfs ./hbase org.apache.hadoop.hbase.PerformanceEvaluation randomRead 1

          Elapsed time in milliseconds=259335
            Row count=1048576

随机写测试 RandomWriteTest

hbase pe --nomapred --oneCon=true --valueSize=100 --compress=SNAPPY --rows=150000 --autoFlush=true --presplit=64 randomWrite 64

把PE模式设为了非MapReduuce(--nomapred),即采用起线程的形式。 跑的命令是randomWrite,即随机写入; 后面跟的64代表起了64个线程来做写入。 --rows=150000 代表每个线程会写入150000行数据。 PE工具的所有的输出都会直接写到LOG文件,LOG的位置需要参照HBase的设置。运行结束后,PE会分别打出每个线程的延迟状况

统计了所有线程的最大持续时间,平均持续时间等等

–nomapred表示不使用MAPREDUCE框架 –oneCon=true 所有线程是否共享连接 –valueSize=100 一次写入所写入value的大小 –compress压缩方式 –presplit=64 创建预分表(初始情况下将table分为多少个分区) –autoFlush=true client在收到put请求时是否每次都发送到region server –rows=150000每个线程需要发送的数据量 每次测试都会删除之前测试创建的测试表。删除表的时间不计入结果