Loading Memcached-Java-Load-Client

Hi all,

I am new in memcached, yscb and java-load-client. I am going to use Memcached-Java-Load-Client for evaluation of memcached. However, I have problem with loading and running load generator. The command is:
java -cp ./lib/memcached-2.6.jar:/usr/share/maven-repo/log4j/log4j/1.2.16/log4j-1.2.16.jar:/usr/share/java/slf4j-log4j12-1.6.4.jar:/usr/share/java/slf4j-api.jar:../Memcached-Java-Load-Client/build/ycsb.jar com.yahoo.ycsb.LoadGenerator -load -P workloads/workloadb

Although I run a memcached on my computer on port 11211, I got the below error message:

0 sec: 0 operations; 0 ops/sec

2013-08-13 01:15:30.954 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2013-08-13 01:15:30.956 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@57ccadea
Exception in thread "PooledThread-0" java.lang.NoSuchMethodError: net.spy.memcached.MemcachedClient.set(Ljava/lang/String;ILjava/lang/Object;)Lnet/spy/memcached/internal/OperationFuture;
at com.yahoo.ycsb.db.SpymemcachedClient.set(Unknown Source)
at com.yahoo.ycsb.memcached.MemcachedWrapper.set(Unknown Source)
at com.yahoo.ycsb.workloads.MemcachedCoreWorkload.doInsert(Unknown Source)
at com.yahoo.ycsb.client.ClientThreadPool$PooledThread.run(Unknown Source)

I should mention that I created the ycsb.jar by using the following command:
ant -Ddb=com.yahoo.ycsb.db.SpymemcachedClient -Dworkload=com.yahoo.ycsb.workloads.CoreWorkload dbcompile-memcached

and I separately downloaded memcached-2.6.jar and memcached-2.5.jar. I tried each version but got the same error.

Any suggestion?

Best Regards,

2 Answers

« Back to question.


I see what you're doing, but let me point out the following:

- Use a recent YCSB and Spymemcached version! The pull request I pointed you to uses my fork of a recent version which uses our official SDK, that under the hood uses spymemcached so you can expect similar performance.

YCSB is a little tricky to work with, and its a maven based system, so won't get much out if it with using ant.

See the detailed instructions on this page here:


This should be anything that you need in order to get started!

« Back to question.


I'm not quite sure what are you trying to do and how you do it. In order to help you, I need some more information.

Also, please use spymemcached 2.9.1, which is the newest version.

If you want to use YCSB with Couchbase, look here, its already done: https://github.com/brianfrankcooper/YCSB/pull/136

Your message looks like that something is not on the classpath during execution. To make your life easier, just use maven or a maven-compliant build system (you use ant here, so stick with ivy).

Make sure everything is on the classpath!