brianfrankcooper / YCSB

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

load data failure for memcached (Caused by: java.lang.NullPointerException) #1436

Open zhaopengoog opened 4 years ago

zhaopengoog commented 4 years ago

Hello, there,

I am following the instructions to run memcached benchmarking.

I would be grateful if somebody can give me a hint to to work around this. I don't have any experience on Java. But it looks like a option or setting issue that is easy to fix. Thanks!

The failure occurs at the 4th step:

./bin/ycsb load memcached -s -P workloads/workloada > outputLoad.txt [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:memcached-binding -am package -DskipTests dependency:build-classpath -DincludeScope=compile -Dmdep.outputFilterFile=true' java -cp /home/MYSELF/bench/YCSB/memcached/conf:/home/MYSELF/bench/YCSB/memcached/target/memcached-binding-0.18.0-SNAPSHOT.jar:/home/MYSELF/.m2/repository/org/apache/htrace/htrace-core4/4.1.0-incubating/htrace-core4-4.1.0-incubating.jar:/home/MYSELF/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.4/HdrHistogram-2.1.4.jar:/home/MYSELF/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/MYSELF/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/home/MYSELF/.m2/repository/net/spy/spymemcached/2.11.4/spymemcached-2.11.4.jar:/home/MYSELF/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.4/jackson-core-asl-1.9.4.jar:/home/MYSELF/bench/YCSB/core/target/core-0.18.0-SNAPSHOT.jar site.ycsb.Client -db site.ycsb.db.MemcachedClient -s -P workloads/workloada -load Command line: -db site.ycsb.db.MemcachedClient -s -P workloads/workloada -load YCSB Client 0.18.0-SNAPSHOT

Loading workload... log4j:WARN No appenders could be found for logger (org.apache.htrace.core.Tracer). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Starting test. 2020-06-17 19:05:07:107 0 sec: 0 operations; est completion in 0 second site.ycsb.DBException: java.lang.NullPointerException at site.ycsb.db.MemcachedClient.init(MemcachedClient.java:133) at site.ycsb.DBWrapper.init(DBWrapper.java:86) at site.ycsb.ClientThread.run(ClientThread.java:91) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at site.ycsb.db.MemcachedClient.createMemcachedClient(MemcachedClient.java:166) at site.ycsb.db.MemcachedClient.init(MemcachedClient.java:122) ... 3 more 2020-06-17 19:05:07:132 0 sec: 0 operations; est completion in 106751991167300 days 15 hours

3eeddie commented 3 years ago

Have you fixed this problem?

hsieh123 commented 8 months ago

This worked for me by appointing memcached.properties file. Run this command under YCSB directory:

bin/ycsb load memcached -s -P workloads/workloada -P memcached/conf/memcached.properties > outputLoad.txt

or

./bin/ycsb load memcached -s -P workloads/workloada \
    -p "memcached.hosts=127.0.0.1" > outputLoad.txt

as the end of README suggested.