首页 > 大数据 > > YCSB 对HBase 性能测试
最近公司要求测试hbase性能,于是和运维同事协商,从公司过保,废弃的6台服务器上,搭起了一个hbase测试集群。
wget https://github.com/downloads/brianfrankcooper/YCSB/ycsb-0.1.4.tar.gz
tar xfvz ycsb-0.1.4.tar.gz
cd ycsb-0.1.4
开始配置测试环境:~/ycsb-0.1.4/hbase-binding/conf$ vim hbase-site.xml
hbase.rootdir
hdfs://hmaster:9000/hbase
The directory shared by region servers.
hbase.master
hmaster:60000
The host and port that the HBase master runs at.
hbase.zookeeper.quorum
hbas1,hbase2,hbase3,hbase4,hbase5,hbase6
<!---->
数据清理:/bin/hbase shellHBase Shell; enter 'help' for list of supported commands. Type "exit" to leave the HBase Shell Version 0.90.3, r1100350, Sat May 7 13:31:12 PDT 2011hbase(main):001:0> status6 servers, 0 dead, 124.0000 average loadhbase(main):010:0> drop 'usertable' ERROR: Table usertable does not exist.' Here is some help for this command: Drop the named table. Table must first be disabled. If table has more than one region, run a major compaction on .META.:hbase(main):002:0> create 'usertable', 'family','f1','f2', 'f3','f4','f5','f6','f7','f8' 0 row(s) in 0.2560 seconds hbase(main):003:0> count 'usertable' 0 row(s) in 0.0680 secondsYCSB需要在HBase中创建一张叫usertable的表,表中包含一个Column Family,CF的名字可自定义。现在加载10000行数据bin/ycsb load hbase -P workloads/workloada -p columnfamily=family -p recordcount=10000 -s -threads 10 -p measurementtype=timeseries -p timeseries.granularity=2000 > fengload.log............................现在执行run:./bin/ycsb run hbase -P workloads/workloada -p columnfamily=family -p recordcount=10000 -threads 10 -p measurementtype=timeseries -p timeseries.granularity=2000 -load -s > feng_transactions.dat重要参数简介:operationcount :事务数,默认是10000事务最大扫描数(maxscanlength) 默认是1000
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8183550/viewspace-750949/,如需转载,请注明出处,否则将追究法律责任。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31537575/viewspace-3131214/ ,如需转载,请注明出处,否则将追究法律责任。