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

Test CQL binding with Cassandra 2.1 #293

Closed
busbey opened this issue Jun 12, 2015 · 6 comments
Closed

Test CQL binding with Cassandra 2.1 #293

busbey opened this issue Jun 12, 2015 · 6 comments

Comments

@busbey
Copy link
Collaborator

busbey commented Jun 12, 2015

I believe Cassandra 2.1 is the current stable line. We know the CQL binding works with a Cassandra 2.0 cluster, need to try for 2.1.

@busbey
Copy link
Collaborator Author

busbey commented Aug 4, 2015

Note that we have confirmed accounts of not working on 2.1+

@cmccoy
Copy link
Collaborator

cmccoy commented Oct 12, 2015

I have a patch (cmccoy@3e8d7bb1aa314e42e65161ede4d8a260e51979e6), but it's a bit awkward - the incompatibility in the current implementation is that Cluster#shutdown() has been renamed Cluster#close(), so I added an abstract CQL client with an overridable cleanup method - for < 2.0 it's Cluster#shutdown(), for >= 2.0 it's Cluster#close().

Anyone have a cleaner idea?

@cmatser
Copy link
Collaborator

cmatser commented Oct 13, 2015

Does the old method compile with the new code... with some sort of deprecated warning? or does it fail to build with the >= 2.0 cassandra libraries?

I'm wondering if we can create a property which defaults to the newer >= 2.0 method, but can be set to use the older <2.0 if desired. Some sort of "cassandra_pre2=true|false" property. Would that be cleaner?

Otherwise, you're talking about two different clients in the concrete classes, yes? Something like CassandraCQLClientGreaterThanOrEqual2_0 and CassandraCQLClientLessThan2_0 would have to be specified on the run command line. (Obviously we'd pick better names. :) )

What is the issue that you feel what you have is not quite a clean solution?

Thanks for tracking this down, btw!

@cmccoy
Copy link
Collaborator

cmccoy commented Oct 13, 2015

Does the old method compile with the new code... with some sort of deprecated warning? or does it fail to build with the >= 2.0 cassandra libraries?

No, it fails to compile. And it turns out my solution doesn't work - the signature for Session#execute(...) also changed, so the CQL common code can't be compiled to work with both 2.0 and 1.0.

I don't like to do this, but maybe we should just duplicate the CQL binding targeting a new database cassandra2, as has been done for HBase.

@cmccoy
Copy link
Collaborator

cmccoy commented Oct 13, 2015

Thanks for tracking this down, btw!

Credit to #204 :)

@cmccoy
Copy link
Collaborator

cmccoy commented Oct 29, 2015

Closed by #454.

@cmccoy cmccoy closed this as completed Oct 29, 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