Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra unknown exception

Tags:

cassandra

I have managed to set up Cassandra + Thrift and the Python wrapper for Thrift LazyBoy, and I have followed an example mentioned in the LazyBoy Wiki.After testing that example I'm getting an error with an exception.

cassandra.ttypes.InvalidRequestException: InvalidRequestException(why='Keyspace
UserData does not exist in this schema.')

here's the exception.I'm expecting some helping hand.

Thanks.

like image 317
Switch Avatar asked Feb 28 '23 10:02

Switch


2 Answers

Make sure that the keyspace 'UserData' exists in your configuration file (conf/storage-conf.xml)

E.g

<Keyspaces>
    <Keyspace Name="UserData">
     ....
</Keyspaces>
like image 154
Schildmeijer Avatar answered Mar 08 '23 15:03

Schildmeijer


For those just starting out with Cassandra/Pycassa then maybe you've been working through this tutorial and you get stuck on the line

col_fam = pycassa.ColumnFamily(pool, 'Standard1')

with an error that looks like

pycassa.cassandra.ttypes.InvalidRequestException: InvalidRequestException(why='Keyspace Keyspace1 does not exist')

To resolve this, start Cassandra

bin/cassandra -f 

And then in another terminal window load the sample schema using

bin/cassandra-cli -host localhost --file conf/schema-sample.txt

Then you should make it past that line in the tutorial.

like image 40
JnBrymn Avatar answered Mar 08 '23 14:03

JnBrymn