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

CassandraJournal constructor fails on creating keyspace #45

Closed
twisniewski opened this issue Mar 23, 2015 · 3 comments
Closed

CassandraJournal constructor fails on creating keyspace #45

twisniewski opened this issue Mar 23, 2015 · 3 comments
Milestone

Comments

@twisniewski
Copy link

We have keyspace created in cassandra by admins and our cassandra user does not have permission to create new keyspaces. Therefore session.execute(createKeyspace) line fails with UnauthorizedException.

Possible sollution is to wrap session.execute(createKeyspace) with check if keyspace already exists on cluster.

Should we provide PR?

@krasserm
Copy link
Owner

I thought CREATE KEYSPACE IF NOT EXISTS already covers that. Have you tried setting cassandra-journal.keyspace to the name of the existing keyspace?

If this doesn't work, please create a pull request. Instead of catching an exception, what do you think about introducing a new cassandra-journal.keyspace.autocreate boolean config parameter?

@twisniewski
Copy link
Author

We had the cassandra-journal.keyspace configured and the CREATE KEYSPACE IF NOT EXISTS failed. I'm gonna provide PR with boolean config parameter later this week.

@krasserm
Copy link
Owner

Great, thank you.

twisniewski added a commit to twisniewski/akka-persistence-cassandra that referenced this issue Mar 26, 2015
krasserm added a commit that referenced this issue Mar 26, 2015
Issue #45 - keyspace autocreation fails when cassandra user doesn't have...
@krasserm krasserm closed this as completed Apr 4, 2015
@krasserm krasserm modified the milestone: 0.3.8 Apr 4, 2015
rafalsiwiec pushed a commit to rafalsiwiec/akka-persistence-cassandra that referenced this issue Mar 23, 2016
rafalsiwiec pushed a commit to rafalsiwiec/akka-persistence-cassandra that referenced this issue Mar 23, 2016
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