使用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

如果报错如下:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:single (default) on project ycsb: Failed to create assembly: Unable to resolve dependencies for assembly 'package': Failed to resolve dependencies for assembly: Missing:
[ERROR] ----------
[ERROR] 1) org.hypertable:hypertable:jar:0.9.5.6
[ERROR] 
[ERROR]   Try downloading the file manually from the project website.
[ERROR] 
[ERROR]   Then, install it using the command: 
[ERROR]       mvn install:install-file -DgroupId=org.hypertable -DartifactId=hypertable -Dversion=0.9.5.6 -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR]   Alternatively, if you host your own repository you can deploy the file there: 
[ERROR]       mvn deploy:deploy-file -DgroupId=org.hypertable -DartifactId=hypertable -Dversion=0.9.5.6 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR]   Path to dependency: 
[ERROR]   	1) com.yahoo.ycsb:ycsb:pom:0.17.0-SNAPSHOT
[ERROR]   	2) com.yahoo.ycsb:hypertable-binding:jar:0.17.0-SNAPSHOT
[ERROR]   	3) org.hypertable:hypertable:jar:0.9.5.6
[ERROR] 
[ERROR] 2) com.allanbank:mongodb-async-driver:jar:2.0.1
[ERROR] 
[ERROR]   Try downloading the file manually from the project website.
[ERROR] 
[ERROR]   Then, install it using the command: 
[ERROR]       mvn install:install-file -DgroupId=com.allanbank -DartifactId=mongodb-async-driver -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file
[ERROR] 
[ERROR]   Alternatively, if you host your own repository you can deploy the file there: 
[ERROR]       mvn deploy:deploy-file -DgroupId=com.allanbank -DartifactId=mongodb-async-driver -Dversion=2.0.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR]   Path to dependency: 
[ERROR]   	1) com.yahoo.ycsb:ycsb:pom:0.17.0-SNAPSHOT
[ERROR]   	2) com.yahoo.ycsb:mongodb-binding:jar:0.17.0-SNAPSHOT
[ERROR]   	3) com.allanbank:mongodb-async-driver:jar:2.0.1
[ERROR] 
[ERROR] ----------
[ERROR] 2 required artifacts are missing.
[ERROR] 
[ERROR] for artifact: 
[ERROR]   com.yahoo.ycsb:ycsb:pom:0.17.0-SNAPSHOT
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :ycsb

表示hypertable:jar:0.9.5.6的jar包无法正常下载需要自己本地下载之后mvn install到mvn本地库。jar包我下载的是0.9.6.5的版本,可以在我的下载中找到hypertable-0.9.6.5.jar,然后下载下来使用mvn install进行安装。

mvn install:install-file -DgroupId=org.hypertable -DartifactId=hypertable -Dversion=0.9.6.5 -Dpackaging=jar -Dfile=/home/wangrui/downloads/hypertable-0.9.6.5.jar

同时根据错误mongodb-async-driver.jar也是需要自己本地下载之后mvn install到mvn本地库的。可以通过下面的指令下载到本地,然后使用mvn install进行安装。

wget http://www.allanbank.com/repo/com/allanbank/mongodb-async-driver/2.0.1/mongodb-async-driver-2.0.1.jar
mvn install:install-file -Dfile=/home/wangrui/downloads/mongodb-async-driver-2.0.1.jar  -DgroupId=com.allanbank -DartifactId=mongodb-async-driver -Dversion=2.0.1 -Dpackaging=jar

重新执行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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值