Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YCSB cassandra-cql IllegalArgumentException: replicate_on_write #291

Closed
cgara opened this issue Jun 10, 2015 · 6 comments
Closed

YCSB cassandra-cql IllegalArgumentException: replicate_on_write #291

cgara opened this issue Jun 10, 2015 · 6 comments

Comments

@cgara
Copy link

cgara commented Jun 10, 2015

Hi,
I'm problem, do not know what to do.
S.O .: Debian 7.8
Cassandra : 2.1.2
Apache Marven 2.2.1 (rdebian-17)
YCSB : https://github.com/brianfrankcooper/YCSB/tree/master/ latest version
error:
YCSB Client 0.1
Command line: -db com.yahoo.ycsb.db.CassandraCQLClient -p host=ip -p port=9042 -p cassandra.username=user-p cassandra.password=pass-P workloads/workloada -s -load -load
com.yahoo.ycsb.DBException: java.lang.IllegalArgumentException: replicate_on_write 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:192)
Caused by: java.lang.IllegalArgumentException: replicate_on_write is not a column defined in this metadata
at com.datastax.driver.core.ColumnDefinitions.getIdx(ColumnDefinitions.java:268)
at com.datastax.driver.core.Row.getBool(Row.java:119)
at com.datastax.driver.core.TableMetadata$Options.(TableMetadata.java:442)
at com.datastax.driver.core.TableMetadata.build(TableMetadata.java:113)
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:125)
... 2 more
[OVERALL], RunTime(ms), 5616.0
[OVERALL], Throughput(ops/sec), 0.0

Thank you!

@busbey
Copy link
Collaborator

busbey commented Jun 10, 2015

could you try rebuilding your YCSB instance with

mvn -Dcassandra.cql.version=2.1.6 clean package

And then run your test again?

@cmatser
Copy link
Collaborator

cmatser commented Jun 10, 2015

Another thing to look at is to leave the cassandra version as is in the top level pom.xml

<cassandra.version>1.2.9</cassandra.version>
<cassandra.cql.version>1.0.3</cassandra.cql.version>

This did work on a Cassandra 2.0.0 server. When you change the version to match (which seems like the logical thing to do), you are pulling in newer client-side drivers that the client binding code was not originally written with. I believe that the cassandra people may have made some updates in the api which break the current binding.

I did at one point try with

<cassandra.version>2.0.0</cassandra.version>
<cassandra.cql.version>2.0.0-beta2-SNAPSHOT</cassandra.cql.version>

This was the latest that was available to me at the time I wrote the CassandraCQLClient. I remember it mostly worked, but had minor issues. So, I went with the older, more stable version in my benchmarks and with the YCSB merge request.

Chrisjan

@cgara
Copy link
Author

cgara commented Jun 10, 2015

Performed with the new parameter , new exception IllegalArgumentException: Core connections for LOCAL hosts must be less than max (2>1)
any other suggestions or should I use version 2.0 of Cassandra.

I need run with one instance.

@busbey
Copy link
Collaborator

busbey commented Jun 10, 2015

This did work on a Cassandra 2.0.0 server. When you change the version to match (which seems like
the logical thing to do), you are pulling in newer client-side drivers that the client binding code was not
originally written with. I believe that the cassandra people may have made some updates in the api
which break the current binding.

Looks like the Cluster object renamed shutdown to close. This sounds like another good justification for #272, and just moving the CQL binding into a new module that can rely on Cassandra 2 proper.

Performed with the new parameter , new exception IllegalArgumentException: Core connections for
LOCAL hosts must be less than max (2>1)
any other suggestions or should I use version 2.0 of Cassandra.

I need run with one instance.

This particular issue you can fix at runtime. The current binding sets the max number of local connections based on the number of threads, defaulting to 1. I don't see where the number of core connections is being set, so 2 is probably a default.

If you add the command line option to set this to atleast 2, you should be fine. i.e. -threads 2.

@cgara
Copy link
Author

cgara commented Jun 10, 2015

Solved!
Another exception was raised, then installed Cassandra 2.0.15, is running without errors
The YCSB is excellent, I am comparing the performance of various nosql DBMS.

Thank you

@busbey
Copy link
Collaborator

busbey commented Jun 12, 2015

Glad to hear things are working for you now. I've filed #293 to cover verifying Cassandra 2.1, hopefully for hte upcoming release.

@busbey busbey closed this as completed Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants