Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bad Request: unconfigured columnfamily <CF_name> in Cassandra

Tags:

cassandra

cql

I am using following version of cql and cassandra. See below: cqlsh 2.3.0 | Cassandra 1.1.10 | CQL spec 3.0.0 | Thrift protocol 19.33.0

I have all CF and tons of data in it. When I run:

cqlsh -2 or cqlsh -3 cql> USE "test_keyspace"; cql:test_keyspace> SELECT * FROM "column_family_name" LIMIT 1;

Note: CFs were created using pycassa and am trying to read using cql. Not sure, if this will make a difference.

It throws, Bad Request: unconfigured columnfamily Perhaps you meant to use CQL 2? Try using the -2 option when starting cqlsh.

Is there any specific settings, that I need to be looking at, to resolve this issue?

like image 310
NullException Avatar asked Apr 22 '13 17:04

NullException


2 Answers

by default CQL3 is case-insensitive unless enclosed in double quotation marks. Try putting your CFNAME in double quotes.

SELECT * FROM "CFNAME" LIMIT 1;

Looks like you have forgotten to enable CQL3 from api at the time of table creation

like image 56
abhi Avatar answered Nov 14 '22 02:11

abhi


I figured, one solution is using nodetool cfstats options and evaluate the result. This works for CFs which were never used at all but not work for CFs which were created and used for sometime, never cleaned up and abandoned later as their is no access time for CF in nodetool cfstats result.

like image 1
NullException Avatar answered Nov 14 '22 00:11

NullException