Test hbase performance using ycsb

Source: Internet
Author: User
For installation and configuration of java, maven, and ycsb, see this blog: blog. csdn. neths794262825articledetails17309845 this blog introduces how to install hbase and how to use ycsb to test hbase. Step 1: Go to mirrors.hust.edu. download the stable version of hbase from cnapachehbase:

Java, maven, ycsb installation and configuration see this blog: http://blog.csdn.net/hs794502825/article/details/17309845 this blog mainly introduces the installation of hbase, and the use of ycsb for hbase basic test steps 1: At http://mirrors.hust.edu.cn/apache/hbase/download hbasestable:

For installation and configuration of java, maven, and ycsb, see this blog:
Http://blog.csdn.net/hs794502825/article/details/17309845

This blog introduces how to install hbase and how to use ycsb to test hbase.

Step 1:
Download the stable version of hbaseat http://mirrors.hust.edu.cn/apache/hbase:
Hbase-0.94.14.tar.gz stored in/home/hs/program directory
Cd/home/hs/program
Tar-zxvf hbase-0.94.14.tar.gz


Step 2:
Modify the pom. xml file in the/home/hs/program/YCSB/hbase directory (based on your hbase version and hadoop version, pay attention to the red part ):


4.0.0

Com. yahoo. ycsb
Root
0.1.4

Hbase-binding
HBase DB Binding


Org. apache. hbase
Hbase

0.94.14



Org. apache. hadoop
Hadoop-core

1.0.4



Com. yahoo. ycsb
Core
$ {Project. version}







Org. apache. maven. plugins
Maven-assembly-plugin
$ {Maven. assembly. version}


Jar-with-dependencies

False



Package

Single











Step 3:
Because the file in step 2 has been changed, you need to re-compile the YCSB Project
Cd/home/hs/program/YCSB
Mvn clean package | tee mvn-clean-package.dat // outputs output to both the screen and file
If similar information is displayed, the compilation is successful:
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] YCSB Root ................................... .......... SUCCESS [7.540 s]
[INFO] Core YCSB ................................... .......... SUCCESS [13.293 s]
[INFO] Cassandra DB Binding .................................. SUCCESS [15.861 s]
[INFO] HBase DB Binding .................................. .... SUCCESS [2: 21. 346 s]
[INFO] Hypertable DB Binding ................................. SUCCESS [5.296 s]
[INFO] DynamoDB Binding ................................... SUCCESS [7.347 s]
[INFO] ElasticSearch Binding ................................. SUCCESS [18.140 s]
[INFO] jdbc db Binding .................................. ..... SUCCESS [5.495 s]
[INFO] Mapkeeper DB Binding .................................. SUCCESS [4.054 s]
[INFO] Mongo DB Binding .................................. .... SUCCESS [3.368 s]
[INFO] OrientDB Binding ...................................... SUCCESS [4.199 s]
[INFO] Redis DB Binding .................................. .... SUCCESS [3.261 s]
[INFO] Voldemort DB Binding .................................. SUCCESS [4.113 s]
[INFO] YCSB Release Distribution Builder ...... SUCCESS [13.764 s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 8 seconds
[INFO] Finished at: Mon Dec 16 12:43:12 CST 2013
[INFO] Final Memory: 94 Mbit/s/227 Mbit/s

Step 4:
After YCSB is compiled, ycsb-0.1.4.tar.gz is displayed in the/home/hs/program/YCSB/distribution/targetdirectory.
Decompress the file to the/home/hs/program directory:
Tar-zxvf/home/hs/program/YCSB/distribution/target-C/home/hs/program

Step 5:
Put the following files in/home/hs/program/hbase-0.94.14/lib:
Slf4j-api-*. jar
Slf4j-log4j12-*. jar
Zookeeper-*. jar
Copy to/home/hs/program/ycsb-0.1.4/hbase-binding/lib

Step 6:
Using hbase-0.94.14 in/home/hs/program/hbase-site.xml/conf
Replace ycsb-0.1.4 in/home/hs/program/hbase-site.xml/hbase-binding/conf

Step 7:
Run the test
Terminal 1:
Go to the hbase installation directory:
Run:./bin/start-hbase.sh
Display:
Starting master, logging to/home/hs/program/hbase-0.94.14/bin/../logs/hbase-hs-master-hs-virtual-machine.out

Run the following command:
./Bin/hbase shell
Create 'usertable', 'cf'

Terminal 2:
Cd/home/hs/program/ycsb-0.1.4

Hs @ hs-virtual-machine :~ /Program/ycsb-0.1.4 $./bin/ycsb load hbase-P workloads/workloada-p hosts = localhost-p columnfamily = cf>./my-results/load-hbase-

Hs @ hs-virtual-machine :~ /Program/ycsb-0.1.4 $./bin/ycsb run hbase-P workloads/workloada-p hosts = localhost-p columnfamily = cf>./my-results/run-hbase-

The following result is displayed:
YCSB Client 0.1
Command line:-db com. yahoo. ycsb. db. HBaseClient-P workloads/workloada-p hosts = localhost-p columnfamily = cf-t
[OVERALL], RunTime (MS), 5886.0
[OVERALL], Throughput (ops/sec), 169.89466530750934
[UPDATE], Operations, 487
[UPDATE], AverageLatency (us), 9366.180698151951
[UPDATE], MinLatency (us), 33
[UPDATE], MaxLatency (us), 4459758
[UPDATE], 95 thPercentileLatency (MS), 0
[UPDATE], 99 thPercentileLatency (MS), 0
[UPDATE], Return = 0,486
......
[READ], Operations, 514
[READ], AverageLatency (us), 2482.817120622568
[READ], MinLatency (us), 707
[READ], MaxLatency (us), 176125
[READ], 95 thPercentileLatency (MS), 2
[READ], 99 thPercentileLatency, 29
[READ], Return = 0,514

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.