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

Update cassandra2-cql layer to use the new driver version. #614

Merged
merged 3 commits into from
Mar 30, 2016

Conversation

uluyol
Copy link
Contributor

@uluyol uluyol commented Feb 5, 2016

Fixes #612.

@busbey
Copy link
Collaborator

busbey commented Feb 5, 2016

Is this based off of the current master branch? It's getting a bunch of checkstyle errors that I didn't think were active yet for core.

Please update your commit message to start with the impacted module, ie "[cassandra2]"

Should we put this in a new Cassandra 3 module to ensure folks can compare Cassandra 2 to Cassandra 3?

@uluyol
Copy link
Contributor Author

uluyol commented Feb 5, 2016

Is this based off of the current master branch? It's getting a bunch of checkstyle errors that I didn't think were active yet for core.

It is based off the current master.

Please update your commit message to start with the impacted module, ie "[cassandra2]"

Done

Should we put this in a new Cassandra 3 module to ensure folks can compare Cassandra 2 to Cassandra 3?

I don't see why that would be necessary. The new driver is backwards compatible (see http://datastax.github.io/java-driver/#compatibility).

@busbey
Copy link
Collaborator

busbey commented Feb 5, 2016

Sounds good. We'll need to figure out what going on with master before merging this.

@kruthar
Copy link
Collaborator

kruthar commented Feb 5, 2016

@busbey - Travis runs mvn test which prints out all the checkstyle errors, but they do not halt execution and they are not the reason why Travis is failing.

It looks like there might be an incompatibility in the test class and it needs to be looked at.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.yahoo.ycsb.db.CassandraCQLClientTest
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.698 sec <<< FAILURE!
com.yahoo.ycsb.db.CassandraCQLClientTest  Time elapsed: 3.697 sec  <<< ERROR!
java.lang.NoSuchMethodError: com.datastax.driver.core.Cluster$Builder.addContactPoints(Ljava/lang/String;)Lcom/datastax/driver/core/Cluster$Builder;
    at org.cassandraunit.CassandraCQLUnit.load(CassandraCQLUnit.java:42)
    at org.cassandraunit.BaseCassandraUnit.before(BaseCassandraUnit.java:32)
    at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


Results :

Tests in error:
  com.yahoo.ycsb.db.CassandraCQLClientTest: com.datastax.driver.core.Cluster$Builder.addContactPoints(Ljava/lang/String;)Lcom/datastax/driver/core/Cluster$Builder;

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

@busbey
Copy link
Collaborator

busbey commented Feb 6, 2016

Good catch! That's what I get for trying to read Travis-CI results on a phone.

@busbey busbey mentioned this pull request Feb 11, 2016
@risdenk
Copy link
Collaborator

risdenk commented Feb 12, 2016

I pulled down #614 and updated cassandra unit to 2.2.2.1 and that didn't fix the test errors. Same error with signature mismatch basically. Looks like cassandraunit isn't at 3.x yet so doesn't support the 3.x classes? I don't know if there is an easy way to fix this yet. Do we need to wait for cassandraunit to a release a 3.x?

@uluyol uluyol closed this Mar 19, 2016
@uluyol uluyol reopened this Mar 19, 2016
@uluyol
Copy link
Contributor Author

uluyol commented Mar 19, 2016

Cassandra-unit has support for Cassandra 3 now. Unfortunately Cassandra 2.2+ requires Java 8 which presumably is causing the tests to fail since they work locally. Not sure what to do here.

@busbey
Copy link
Collaborator

busbey commented Mar 20, 2016

For now, I think the best path is to

  1. add a JUnit Assume that limits the Cassandra tests to only run them under JDK8+

  2. expand our travis-ci profile to also test one jdk8 (probably Oracle)

  3. verify wether or not a client using the Cassandra 3 driver to talk to a Cassandra 2.2+ server has to be using jdk8

  4. based on the outcome of 3, update the README to indicate that folks wanting to test against Cassandra 2.2+ need to run JDK8 (our jdk7 compiled release artifacts should still work fine).

@nastra
Copy link

nastra commented Mar 24, 2016

Do we already have someone for tackling all of those 4 points? If not, I would take a look at it, because I'd like to get that PR merged sooner than later and use it for testing C* 3.0 with YCSB.

@risdenk
Copy link
Collaborator

risdenk commented Mar 24, 2016

Do we already have someone for tackling all of those 4 points? If not, I would take a look at it, because I'd like to get that PR merged sooner than later and use it for testing C* 3.0 with YCSB.

@nastra If you are willing to help then go for it. Only number 1 on the list requires modifying this PR. Items 2-4 would be separate PRs it looks like.

@uluyol Can you update the PR to address @busbey's first item about only running the Cassandra 3 test under JDK8+?

@uluyol
Copy link
Contributor Author

uluyol commented Mar 25, 2016

I'm not sure how to fix this, it looks like just loading the test causes issues. I don't have much time to work on this so @nastra or whoever else can feel free to take this over.

@busbey
Copy link
Collaborator

busbey commented Mar 25, 2016

thanks for the work so far @uluyol!

@busbey
Copy link
Collaborator

busbey commented Mar 25, 2016

I put up #669 to get around the jdk7 incompatibility.

@busbey busbey merged commit 1aa8c33 into brianfrankcooper:master Mar 30, 2016
@busbey
Copy link
Collaborator

busbey commented Mar 30, 2016

Number 1 is taken care of now. @nastra could you take a look at handling numbers 2-4?

@risdenk
Copy link
Collaborator

risdenk commented Mar 30, 2016

@busbey and @nastra I'm going to open new issues for numbers 2-4 and linked them to this. That would allow better tracking.

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

Successfully merging this pull request may close these issues.

5 participants