brianfrankcooper / YCSB

Yahoo! Cloud Serving Benchmark
Apache License 2.0
4.9k stars 2.22k forks source link

Prevent YCSB from re-running mvn #1633

Closed mdorier closed 2 years ago

mdorier commented 2 years ago

When I run YCSB, it displays the following (for example with rocksdb):

$ ./bin/ycsb load rocksdb -s -P workloads/workloada -p rocksdb.dir=/tmp/ycsb-rocksdb-data
[WARN]  Running against a source checkout. In order to get our runtime dependencies we'll have to invoke Maven. Depending on the state of your system, this may take ~30-45 seconds
[DEBUG]  Running 'mvn -pl site.ycsb:rocksdb-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true'

This is despite having built the rocksdb backend beforehand using mvn -pl site.ycsb:rocksdb-binding -am clean package.

Reading the bin/ycsb script I see that it detects whether it's a distribution or not by looking at whether pom.xml is present. If I rename pom.xml to prevent it from finding it, I'm getting this:

./bin/ycsb load rocksdb -s -P workloads/workloada -p rocksdb.dir=/tmp/ycsb-rocksdb-data
/usr/bin/java site.ycsb.Client -db site.ycsb.db.rocksdb.RocksDBClient -s -P workloads/workloada -p rocksdb.dir=/tmp/ycsb-rocksdb-data -load
Error: Could not find or load main class site.ycsb.Client
Caused by: java.lang.ClassNotFoundException: site.ycsb.Client

I suspect I need to set the CLASSPATH variable somehow, but can't figure out what to put to make it work. Any help?

(For the context, I need to prevent it from invoking maven because I'll be running YCSB on the compute nodes of a supercomputer, and those nodes don't have maven installed, so I need to build YCSB on the login node, where maven is, before deploying a job that uses YCSB)

busbey commented 2 years ago

please use a convenience binary tarball rather than trying to run from a copy of the source checkout.

mdorier commented 2 years ago

Ah yes, I figured that not specifying the backend to build would build an archive that I could use. I didn't find this documented anywhere, but maybe I missed it. Thanks.