YCSB over Cassandra 1.2.12 - No errors but not working #154

Scareabgel opened this Issue Dec 16, 2013 · 9 comments

6 participants


I have once used YCSB to evaluate a set of NoSQL databases. Now I wanted to do it again but in different environment and I havn't been able to.
I installed Cassandra 1.2.12 on 1 node (as test) and after created keyspace usertable:
WITH replication = {'class':'SimpleStrategy',
But it seems that it is no longer possible to create "column family" and I do not know what to do. When I run YCSB I get 0 ops/sec every 10sec but no errors or exceptions at all.
I think that maybe layer that was created for version 1.0.6 is not suitable for 1.2 version but I am not sure and I don't know what changes I should make for it to work.

Any ideas? Really need your help guys.
Regards, Veronika


Hi Veronika,

Cassandra has gone through a number of changes since YCSB was last updated with the bindings for it. Even the version of Cassandra you mention 1.2.12 is not the latest. I'm currently testing Cassandra 2.0 and can tell you that our performance results are much improved over 1.2.

With regards to YCSB, I recently submitted a pull request for the cassandra binding that works with both Cassandra 1.2 and 2.0. It uses CQL which appears to be the query language Cassandra intends for clients to use going forward. For the driver, I haven't looked lately, but when I coded this new binding only the 1.2 version was generally available. I tested and found this driver to work on both 1.2 and 2.0 Cassandra server installations.

So, my advice is to integrate my pull request on your local disk and you can use the new "cassandra-cql" binding. And instead of a "column family", you can create a "table" like this:
create table usertable (
y_id varchar primary key,
field0 varchar,
field1 varchar,
field2 varchar,
field3 varchar,
field4 varchar,
field5 varchar,
field6 varchar,
field7 varchar,
field8 varchar,
field9 varchar);

You can find it in issue #145 .



Oh ... well, I saw your pull before posting here but I was not sure it I could/should use it. I think I got a bit confused by name of it ... sorry :/ I will use your layer and hope it works.
Thanks a lot.



I am very sorry to bother you again, but I have a bit of a problem. Since you are testing Cassandra cluster I thought you might know. I am able to create keyspace and table on all nodes by using master but when I load data it is only stored on master instead of being distributed. I run:
./bin/ycsb load cassandra-cql -p host="" -p port=9042 -P workloads/workloada ...
and then when I check nodetool (./nodetool -h ring) I get:

Address Rack Status State Load Owns Token 2 Up Normal 1.08GB 100% 0 2 Up Normal 67.58KB 0% 330000 2 Up Normal 52.79KB 0% 660000

I have tried differet tokens (by calculating with tool and not) and partitions configs, no luck. Maybe you have had something similar? Or is my ycsb command wrong?

Regards, Veronika


I would check your cassandra server config. This does seem strange. The YCSB client is just going to make the call to insert a record. It's up to the cluster node to determine where to place that record in the cluster. The client doesn't have control of that as far as I know.

Check your num_tokens value in the server config. This is used in the determination of creating the token. The default of 256 usually works.

Also of some note is when the YCSB client connects, I have it printing out some metadata connection messages to stdout. Your should see your cluster name and all the discovered nodes ip addresses, no matter which node you connect to. That should indicate that node has visibility to the other nodes in the cluster.



Yah, I asked just to be sure that my ycsb command was correct and I had incorrect setup. It was indeed a token problem. Yesterday I have tried different token configurations and partitions and was not able to make it work. But now thanks to some tips I got it works.

Thank you very much for all help :)


Can this be closed so the pull request can make it through?


closing as stale now that #145 has been merged in. If you're still having issues please reopen.

@busbey busbey closed this Jun 6, 2015

Hello everyone,
I am new user and I am trying to use YCSB (version 0.2.0) with Cassandra (version 2.2) on Debian 8 64bits. As I read in this thread, I tried to configure them and I created the cassandra database with the command (from cqlsh):

cqlsh> CREATE KEYSPACE usertable WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };cqlsh> use usertable ;
cqlsh:usertable> create table usertable ( y_id varchar primary key, field0 varchar, field1 varchar, field2 varchar, field3 varchar, field4 varchar, field5 varchar, field6 varchar, field7 varchar, field8 varchar, field9 varchar);

and I ran the YCSB command:
bin/ycsb load cassandra-cql -p host="" -p port=9042 -P workloads/workloada -s > /dev/null

Unfortunatelly, as you can see below, it doesn't work.
The number of operations remain 0 and it crash!
What is it wrong in my settings? How can I fix it?

Thank you very much

~/git/ycsb-0.2.0$ bin/ycsb load cassandra-cql -p host="" -p port=9042 -P workloads/workloada -s> /dev/null
/usr/lib/jvm/java-8-oracle/bin/java -cp /home/user/git/ycsb-0.2.0/cassandra-binding/conf:/home/user/git/ycsb-0.2.0/conf:/home/user/git/ycsb-0.2.0/lib/HdrHistogram-2.1.4.jar:/home/user/git/ycsb-0.2.0/lib/jackson-core-asl-1.9.4.jar:/home/user/git/ycsb-0.2.0/lib/core-0.2.0.jar:/home/user/git/ycsb-0.2.0/lib/jackson-mapper-asl-1.9.4.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jline-1.0.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/high-scale-lib-1.1.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/concurrentlinkedhashmap-lru-1.3.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/httpclient-4.0.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/netty-3.5.9.Final.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/commons-logging-1.1.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/compress-lzf-0.8.4.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jetty-util-6.1.22.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/cassandra-thrift-1.2.9.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/libthrift-0.7.0.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/snakeyaml-1.6.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/servlet-api-2.5-20081211.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jackson-mapper-asl-1.9.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/guava-13.0.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/slf4j-log4j12-1.7.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/stringtemplate-3.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/snaptree-0.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jbcrypt-0.3m.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/commons-codec-1.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jamm-0.2.5.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/antlr-3.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/log4j-1.2.16.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/antlr-2.7.7.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/slf4j-api-1.6.4.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/json-simple-1.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jackson-core-asl-1.9.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/antlr-runtime-3.2.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/httpcore-4.0.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/cassandra-driver-core-1.0.3.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/metrics-core-2.0.3.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/commons-cli-1.1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/cassandra-binding-0.2.0.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/cassandra-all-1.2.9.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/jetty-6.1.22.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/lz4-1.1.0.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/servlet-api-2.5.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/commons-lang-2.6.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/avro-1.4.0-cassandra-1.jar:/home/user/git/ycsb-0.2.0/cassandra-binding/lib/snappy-java-1.0.5.jar com.yahoo.ycsb.Client -db com.yahoo.ycsb.db.CassandraCQLClient -p host= -p port=9042 -P workloads/workloada -s -load
Loading workload...
Starting test.
2015-07-22 19:09:27:118 0 sec: 0 operations;
log4j:WARN No appenders could be found for logger (com.datastax.driver.core.Cluster).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
com.yahoo.ycsb.DBException: java.lang.IllegalArgumentException: column_aliases is not a column defined in this metadata
at com.yahoo.ycsb.db.CassandraCQLClient.init(CassandraCQLClient.java:158)
at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63)
at com.yahoo.ycsb.ClientThread.run(Client.java:195)
Caused by: java.lang.IllegalArgumentException: column_aliases is not a column defined in this metadata
at com.datastax.driver.core.ColumnDefinitions.getIdx(ColumnDefinitions.java:268)
at com.datastax.driver.core.Row.getString(Row.java:414)
at com.datastax.driver.core.TableMetadata.build(TableMetadata.java:88)
at com.datastax.driver.core.Metadata.buildTableMetadata(Metadata.java:124)
at com.datastax.driver.core.Metadata.rebuildSchema(Metadata.java:88)
at com.datastax.driver.core.ControlConnection.refreshSchema(ControlConnection.java:265)
at com.datastax.driver.core.ControlConnection.tryConnect(ControlConnection.java:220)
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:168)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:81)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:644)
at com.datastax.driver.core.Cluster$Manager.access$100(Cluster.java:586)
at com.datastax.driver.core.Cluster.(Cluster.java:69)
at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:96)
at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:567)
at com.yahoo.ycsb.db.CassandraCQLClient.init(CassandraCQLClient.java:131)
... 2 more
2015-07-22 19:09:37:109 10 sec: 0 operations;


You are not using the default keyspace name "ycsb". Did you update the "cassandra.keyspace" property in your workload to use your keyspace name of "usertable"?

If this does not correct your problem, please open a new thread as this one is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment