使用ycsb的mapkeeper连接mapkeeper里面的server进行测试

首先在进行连接之前,要参考前面的几篇文章进行相应的包下载和安装,我是使用的centos操作系统,安装libevent、thrift、boost(需要在thrift前进行安装)、snappy等。这些包安装好之后进行填坑环节。

mapkeeper首先要在一些文件中添加如下内容:ycsb中mapkeeper部署

然后执行:

mvn clean package -Dmaven.test.skip=true

会报错:

Could not resolve dependencies for project com. yahoo.ycsb:mapkeeper-binding:jar:0.17.0-SNAPSHOT: Could not find artifact com.yahoo.mapkeeper:mapkeeper:jar:1.0 in mapkeeper-releases

这就很难过了,于是发现找不到mapkeeper的jar包和ycsb本身要生成的jar不同,这个jar包主要是为MapkeeperClient.java提供import的包的,如果用ycsb自身的包会出现以下类似的错误:

YCSB/mapkeeper/src/main/java/com/yahoo/ycsb/db/MapKeeperClient.java:[35,27]  package com.yahoo.mapkeeper does not exist

就是说找不到com.yahoo.mapkeeper包中的类函数。

所以这个mapkeeper.jar包在哪里找呢,应该在dowmload的mapkeeper文件夹下的lib文件夹中找到mapkeeper.jar,然后进行:

mvn deploy:deploy-file -DgroupId=com.yahoo.mapkeeper -DartifactId=mapkeeper -Dversion=1.0 -Durl=file:./lib -DrepositoryId=lib  
-Dfile=/home/wangrui/downloads/YCSB/lib/mapkeeper.jar

之后生成的文件夹替换掉/root/.m2/repository/com/yahoo路径下的mapkeeper文件夹,最后pwd文件路径为/root/.m2/repository/com/yahoo/mapkeeper/mapkeeper/1.0。这个路径下存在的文件为:(我的下载中也会上传已经部署好的mapkeeper文件夹)

[root@localhost 1.0]# ls
mapkeeper-1.0.jar      mapkeeper-1.0.jar.sha1  mapkeeper-1.0.pom.md5
mapkeeper-1.0.jar.md5  mapkeeper-1.0.pom       mapkeeper-1.0.pom.sha1

然后执行:

mvn clean package -Dmaven.test.skip=true

显示BUILD SUCCESS表示成功。

ycsb端:

bin/ycsb load mapkeeper -s -P workloads/workloada -p "mapkeeper.host=127.0.0.1" -p "mapkeeper.port=9090"
bin/ycsb run mapkeeper -s -P workloads/workloada -p "mapkeeper.host=127.0.0.1" -p "mapkeeper.port=9090"

mapkeeper端:

./mapkeeper_rocksdb 1 0 0 ./data

 

你可能感兴趣的:(rocksdb,mapkeeper)