Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update to work with Cassandra 1.0 #154

Open
wants to merge 2 commits into from

6 participants

Jason M. Kusar Emanuele Gaifas Patrick Negri Jake Luciani Ben McCann jasonwee
Jason M. Kusar

Specifically Cassandra 1.0.5

Emanuele Gaifas

I tried both implementation of support for 1.0, this one and the one by "grimesp", and was not able to get the reuter demo working with either, when instead it works out-of-the-box with tjake's current head: the data load seems going ok, but the website remains completely empty... Issue #147 seems reporting similar effects. What could I miss?

jkusar's one needed some manual tweak to the cassandra.yaml, while grimesp's seems already took care about that.

I'm planning to move my indexing solution to solr, and I'd like to jump on cassandra 1.0 at the same time (I'm currently using a suboptimal whoosh based solution with cassandra 0.8.x), to avoid two distinct data migrations.... so I'm looking forward to see this merged in!

Thanks in advance.

Jason M. Kusar

Actually, I've just discovered that Cassandra 1.0+ totally breaks sorting in Solandra. (Note that this is a different problem than the previous sort issue that has been discussed and worked around.) Not exactly sure what's going on yet, but it appears that no matter what sort order you give it, it comes back in order indexed (or reverse order if you tell it desc).

I'm going back to Cassandra 0.8.9 for now as I don't have time to investigate, but hopefully I'll have some time to look into it in the near future.

Patrick Negri

Guys lets fix this. Cassandra 0.8.9 isnt stable as 1.0 :/

Jake Luciani
Owner

Yeah 1.0 won't work with Solandra, it will with 1.1 so once thats out I'll upgrade

Jason M. Kusar

Any chance of getting a preview against the beta (as if you didn't have anything else to do)? I'd love to see if this will fix some of the other issues I've been having. There seems to still be continuing sort issues even with 0.8.9.

Ben McCann

It would be cool to have a git branch with support for 1.1.0-beta2 (which is now available in the Maven central repo: http://search.maven.org/#browse%7C-1601434515)

Ben McCann

Here's the code needed to compile with 1.1.0-beta2:
#169

jasonwee

it works for cassandra 1.0.8 too, verified that with reuters and wikissandra demo loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 2, 2011
  1. Jason M. Kusar
Commits on Dec 3, 2011
  1. Jason M. Kusar

    Use Cassandra 1.0.5 lib

    jasonmk authored
This page is out of date. Refresh to see the latest.
2  ivy.xml
View
@@ -38,7 +38,7 @@
<dependency org="org.mortbay.jetty" name="jetty-util" rev="6.1.26" conf="* -> *,!sources,!javadoc" />
<dependency org="org.mortbay.jetty" name="jsp-2.1" rev="6.1.14" conf="* -> *,!sources,!javadoc" />
- <dependency org="org.apache.cassandra" name="cassandra-all" rev="0.8.6" conf="* -> *,!sources,!javadoc" />
+ <dependency org="org.apache.cassandra" name="cassandra-all" rev="1.0.5" conf="* -> *,!sources,!javadoc" />
<dependency org="net.java.dev.jna" name="jna" rev="3.2.7" conf="* -> *,!sources,!javadoc" />
<dependency org="org.xerial.snappy" name="snappy-java" rev="1.0.3.1" conf="* -> *,!sources,!javadoc" />
</dependencies>
6 src/lucandra/CassandraUtils.java
View
@@ -34,7 +34,7 @@
import java.util.zip.Inflater;
import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.config.Schema;
import org.apache.cassandra.db.*;
import org.apache.cassandra.db.filter.QueryPath;
import org.apache.cassandra.service.AbstractCassandraDaemon;
@@ -307,7 +307,7 @@ public static void createCassandraSchema() throws IOException
return;
}
- if (DatabaseDescriptor.getNonSystemTables().contains(keySpace))
+ if (Schema.instance.getNonSystemTables().contains(keySpace))
{
logger.info("Found Solandra specific schema");
return;
@@ -329,7 +329,7 @@ public static void createCassandraSchema() throws IOException
System.exit(2);
}
- if (DatabaseDescriptor.getNonSystemTables().contains(keySpace))
+ if (Schema.instance.getNonSystemTables().contains(keySpace))
{
logger.info("Found Solandra specific schema");
return;
3  src/solandra/SolandraComponent.java
View
@@ -35,6 +35,7 @@
import com.google.common.collect.MapMaker;
import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.config.Schema;
import org.apache.cassandra.db.Row;
import org.apache.cassandra.db.filter.QueryPath;
import org.apache.cassandra.service.StorageService;
@@ -93,7 +94,7 @@ public static boolean prepare(ResponseBuilder rb) throws IOException
if(!hasSolandraSchema.get())
{
//Check is Solandra schema exists, if not die
- if(! DatabaseDescriptor.getNonSystemTables().contains(CassandraUtils.keySpace) )
+ if(! Schema.instance.getNonSystemTables().contains(CassandraUtils.keySpace) )
throw new IOException("Solandra keyspace is missing, please import then retry");
else
hasSolandraSchema.set(true);
Something went wrong with that request. Please try again.