参考来源如下。
打包https://github.com/brownsys/zookeeper-benchmark
使用开源工具进行 ZooKeeper 的性能测试,参考官方文档,通过 mvn -DZooKeeperVersion=
镜像org.apache.maven.plugins maven-jar-plugin 2.3.1 edu.brown.cs.zkbenchmark.ZooKeeperBenchmark true ./lib/ false org.apache.maven.plugins maven-assembly-plugin 2.5.5 edu.brown.cs.zkbenchmark.ZooKeeperBenchmark jar-with-dependencies
打完包之后,制作一个简单的镜像。
FROM openjdk:oraclelinux7 WORKDIR /zk-benchmark COPY Centos-7.repo /etc/yum.repos.d/CentOS-base.repo RUN yum install vim-minimal COPY ./target/zkbenchmark-0.1-SNAPSHOT-jar-with-dependencies.jar . COPY benchmark.conf .执行
java -jar zkbenchmark-0.1-SNAPSHOT-jar-with-dependencies.jar --conf /path/to/benchmark.conf



