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

Cassandra bootstrap not mentioned in README #281

Closed
jongb opened this issue Jan 18, 2013 · 3 comments
Closed

Cassandra bootstrap not mentioned in README #281

jongb opened this issue Jan 18, 2013 · 3 comments

Comments

@jongb
Copy link

jongb commented Jan 18, 2013

The bootstrap of Cassandra data from src/main/cql/install.cql needed to run the application is not mentioned in README.
This causes the application to fail on first user registration, since expected colum families are not present in Cassandra.

@jdubois
Copy link
Contributor

jdubois commented Jan 18, 2013

There is probably another error... If the "Tatami" keyspace does not exist at startup, the Tatami webapp will automatically create it with the correct column families. That's why I am not talking about the install.cql in the README file, as you don't have to use it.
The install.cql is mostly here for upgrading an existing keyspace : if you already have a "tatami" keyspace, and you want to upgrade to a newer version of Tatami, you will need this install.cql file to create the new column families.
Can you give me more details? There might be a difference between the install.cql file and the Java code that automatically creates the keyspace at startup (see fr.ippon.tatami.config.CassandraConfiguration)

@jongb
Copy link
Author

jongb commented Jan 18, 2013

Ok. I see.
This seems to be a secondary problem.
The first one is this:
taoensso/carmine#5

I was running om Maven 3, with JDK 7.
Cassandra-all, 1.1.8 has a transitive dependency to snappy-java, 1.0.4.1.

[INFO] +- org.apache.cassandra:cassandra-all:jar:1.1.8:compile
[INFO] | +- org.xerial.snappy:snappy-java:jar:1.0.4.1:compile

Confirmed it by installing JDK 6.
Works fine now.
A warning in the doc for future users?

There is however an issue with the keyspace.
If it has been created incorrectly (or manually?) in the past it fails tuntime.
I had to run drop keyspace before mvn jetty:run to get it running.

@jdubois
Copy link
Contributor

jdubois commented Jan 18, 2013

OK, so this is a Mac OS/JDK/Cassandra bug. I'll put a word about this in the README and reference this bug in my commit.

By the way, Datastax recommends JDK 1.6 for Cassandra.

If you have already created your keyspace earlier, and are upgrading to a newer version, then indeed you need to create the new column families using the CQL file. And this is not clearly documented at the moment.

Next time I have a stable version I will take this into account :

  • I will tag the release correctly
  • I will write some upgrade notes somewhere (probably in a UGRADE.md file at the root of the project)

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

2 participants