Binary incompatibility with cassandra 1.2.6 #352

Closed
tsachev opened this Issue Jul 2, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@tsachev
Contributor

tsachev commented Jul 2, 2013

Hi I am trying to update my dependencies to the latest cassandara 1.2.x version currently 1.2.6.
There seems to be binary incompatibility in cassandra thirft TBinaryProtocol.
The constructor signature has been changed. :(.
I think that using TBinaryProtocol.Factory instead of TBinaryProtocol will fix the problem.

so

cassandraClient = new Cassandra.Client(new TBinaryProtocol(transport));

in ThriftConnection.open should become

cassandraClient = new Cassandra.Client(new TBinaryProtocol.Factory().getProtocol(transport));

Here is the stack trace for reference.

java.lang.NoSuchMethodError: org.apache.cassandra.thrift.TBinaryProtocol: method <init>(Lorg/apache/thrift/transport/TTransport;)V not found
at com.netflix.astyanax.thrift.ThriftSyncConnectionFactoryImpl$ThriftConnection.open(ThriftSyncConnectionFactoryImpl.java:195)
at com.netflix.astyanax.thrift.ThriftSyncConnectionFactoryImpl$ThriftConnection$1.run(ThriftSyncConnectionFactoryImpl.java:232)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
@lakshmi-kannan

This comment has been minimized.

Show comment
Hide comment
@lakshmi-kannan

lakshmi-kannan Jul 9, 2013

This is breaking our builds too. For now, we are forcing a dependency less than 1.2.6. The PR from @tsachev seems reasonable. Could you review & merge this, please?

This is breaking our builds too. For now, we are forcing a dependency less than 1.2.6. The PR from @tsachev seems reasonable. Could you review & merge this, please?

@elandau

This comment has been minimized.

Show comment
Hide comment
@elandau

elandau Jul 9, 2013

Contributor

Any particular reason you need 1.2.6 on the client? Cassandra jars are being pulled in for convenience so astyanax won't need to implement things already in the cassandra code (such as partitioner). You can actually run a client with Cassandra 1.1 jars against a server running Cassandra 1.2.

Contributor

elandau commented Jul 9, 2013

Any particular reason you need 1.2.6 on the client? Cassandra jars are being pulled in for convenience so astyanax won't need to implement things already in the cassandra code (such as partitioner). You can actually run a client with Cassandra 1.1 jars against a server running Cassandra 1.2.

@lakshmi-kannan

This comment has been minimized.

Show comment
Hide comment
@lakshmi-kannan

lakshmi-kannan Jul 10, 2013

@elandau: At least in our case, we just depend on Astyanax 1.56.32 alone (which in turn has dependency on org.apache.cassandra 1.2+).
http://mvnrepository.com/artifact/com.netflix.astyanax/astyanax-cassandra/1.56.32

Our server is running Cassandra 1.0.8 (we are in the process of upgrading). Our tests fail because astyanax client wouldn't connect to cassandra (stack trace same as above). So we now force version 1.2.5 for cassandra. It would be nice not to do that. I hope it gives you a little more context.

@elandau: At least in our case, we just depend on Astyanax 1.56.32 alone (which in turn has dependency on org.apache.cassandra 1.2+).
http://mvnrepository.com/artifact/com.netflix.astyanax/astyanax-cassandra/1.56.32

Our server is running Cassandra 1.0.8 (we are in the process of upgrading). Our tests fail because astyanax client wouldn't connect to cassandra (stack trace same as above). So we now force version 1.2.5 for cassandra. It would be nice not to do that. I hope it gives you a little more context.

@tsachev

This comment has been minimized.

Show comment
Hide comment
@tsachev

tsachev Jul 11, 2013

Contributor

Also I am planning to run tests for my queries which will run EmbeddedCassandra. Having different versions for client and server in this case (if at all possible) will be a lot of pain.
And yes of course I prefer to run the tests against the actual Cassandra version used. Which in my case (early stage of development) is the latest one.

Contributor

tsachev commented Jul 11, 2013

Also I am planning to run tests for my queries which will run EmbeddedCassandra. Having different versions for client and server in this case (if at all possible) will be a lot of pain.
And yes of course I prefer to run the tests against the actual Cassandra version used. Which in my case (early stage of development) is the latest one.

@lakshmi-kannan

This comment has been minimized.

Show comment
Hide comment

@elandau: Any updates?

opuneet added a commit that referenced this issue Aug 1, 2013

@opuneet

This comment has been minimized.

Show comment
Hide comment
@opuneet

opuneet Aug 1, 2013

Contributor

Merged in PR. Thanks.

Contributor

opuneet commented Aug 1, 2013

Merged in PR. Thanks.

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