Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upsupport for cassandra 2.0 #70
Comments
|
As you know that, com.google.common.collect.MapMaker.makeComputingMap() method deprecated and accessor is friend. And below is javadoc.
|
|
thanks for reporting that. I'm working on it |
|
I just pushed a first snapshot integrating the support of Cassandra 2 while waiting for the next release, snapshot is already available with the fix (2.0.2.0-SNAPSHOT : https://oss.sonatype.org/content/repositories/snapshots/) |
|
I am having some issues with 2.0.2.0-SNAPSHOT , just tried using the snapshot you kindly published. The issue at hand - I can't get CQL data loader to work. My code looks as follows EmbeddedCassandraServerHelper.startEmbeddedCassandra("cassandra.yaml");
CQLDataLoader loader = new CQLDataLoader("127.0.0.1", 9160);
loader.load(new ClassPathCQLDataSet("data.cql"));Cassy starts just fine, but creating new loader fails. After starting the server I get the usual
And then, when trying to load CQL data file
Any clue what might be causing this ? |
|
the CQL loader is based on the java driver which is not using the thrift protocol so i guess the problem is coming from somewhere else. I don't know where com.thinkaurelius.thrift.Message class is coming from because it's not part of cassandra as well. I updated the https://github.com/jsevellec/cassandra-unit-examples project and tried to reproduce your issue but without success. Are you able to push a simple project repoducing the problem? Regards, |
|
this should be the smallest version that errors out, https://github.com/gibffe/cassyunit-2.0-test |
|
you're using a bad port. In your cassandra.yaml, the native protocol is using : native_transport_port: 9042 In your SimpleClientTest, just replace 9141 to 9042. |
|
doh, that did it, ty ;) |
|
Thanks for doing the work to upgrade to Cassandra 2 :) In using 2.0.2.0-SNAPSHOT, I get two errors: ERROR 2013-11-26 10:34:18,214 [Native-Transport-Requests:4] org.apache.cassandra.transport.messages.ErrorMessage [line 222] - Unexpected exception during request I got around this by excluding org.jboss.netty which allows Cassandra to use io.netty:netty The other issue is with jamm's MemoryMeter: java.lang.IllegalStateException: Instrumentation is not set; Jamm must be set as -javaagent I set up jamm as a javaagent, which does resolve the issue. Would be great to not have to do that. Not sure how that could be done, as the requirement is in Cassandra. |
|
It sounds like a classpath problem but it´s just my first feeling. Are you able to push a simple project where i can reproduce this problem? |
|
I tired to recreate the issue, and I think you're right. IntelliJ must have been caching the older version of netty. Any thoughts on how to get around the -javaagent requirement? After poking around a bit, I don't know of any simple way w/o modifying jamm to allow starting the agent after the VM starts. |
|
For my purposes, just running Cassandra for integration tests, I can hack MemoryMeter using Mockito: Instrumentation instrumentation = mock(Instrumentation.class); |
|
So i understand well, no remaining issue on the cassandra-unit side? |
|
correct. thank you :) |
|
I Just upgraded to 2.0.2.0 (and Cassandra 2.0.6) and hit the same NoSuchMethodError that was reported above. From what I can tell, cassandra-unit's pom points to org.jboss.netty:netty:3.2.9.Final, in which the org.jboss.netty.channel.Channel class indeed doesn't have a getAttachment method. I suspect you may have had a newer Netty version pulled in by some other dependency, so it worked for you by chance. My workaround was to add io.netty:netty:3.7.0.Final (which itself is not the latest version, but was used elsewhere in my project) explicitly as the first dependency in my project's pom, so that it'll be first on the classpath. I haven't tested anything beyond that yet, but at least the NoSuchMethodError is fixed. I would suggest to reopen this issue until cassandra-unit upgrades to a more recent version of netty where the missing method exists. |
Hi
I tried to use cassandra 2.0 lib, failed.
IllegalAccessError occured, Can you fix this?
java.lang.IllegalAccessError: tried to access method com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap; from class org.apache.cassandra.service.StorageProxy
at org.apache.cassandra.service.StorageProxy.(StorageProxy.java:84)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:432)
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:411)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:278)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:366)
at org.cassandraunit.utils.EmbeddedCassandraServerHelper$1.run(EmbeddedCassandraServerHelper.java:102)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
my pom.xml is below.