You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kuldeep Mishra <ku...@gmail.com> on 2013/04/10 09:37:55 UTC
describe keyspace or column family query not working
Hi ,
I am trying to execute following query but not working and throwing
exception
QUERY:--
Cassandra.Client client;
client.execute_cql3_query(ByteBuffer.wrap("describe keyspace
mykeyspace".getBytes(Constants.CHARSET_UTF8)), Compression.NONE,
ConsistencyLevel.ONE);
client.execute_cql3_query(ByteBuffer.wrap("describe table
mytable".getBytes(Constants.CHARSET_UTF8)), Compression.NONE,
ConsistencyLevel.ONE);
but both query giving following exception,
STACK TRACE
InvalidRequestException(why:line 1:0 no viable alternative at input
'describe')
at
org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result.read(Cassandra.java:37849)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at
org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql3_query(Cassandra.java:1562)
at
org.apache.cassandra.thrift.Cassandra$Client.execute_cql3_query(Cassandra.java:1547)
Please help..
Thanks and Regards
Kuldeep
--
Thanks and Regards
Kuldeep Kumar Mishra
+919540965199
Re: describe keyspace or column family query not working
Posted by aaron morton <aa...@thelastpickle.com>.
tables created without COMPACT STORAGE are still visible in cassandra-cli.
Cheers
-----------------
Aaron Morton
Freelance Cassandra Consultant
New Zealand
@aaronmorton
http://www.thelastpickle.com
On 11/04/2013, at 5:40 AM, Tyler Hobbs <ty...@datastax.com> wrote:
>
> On Wed, Apr 10, 2013 at 11:09 AM, Vivek Mishra <mi...@gmail.com> wrote:
> Ok. A column family and keyspace created via cqlsh using cql3 is visible via cassandra-cli or thrift API?
>
> The column family will only be visible via cassandra-cli and the Thrift API if it was created WITH COMPACT STORAGE: http://www.datastax.com/docs/1.2/cql_cli/cql/CREATE_TABLE#using-compact-storage
>
>
> --
> Tyler Hobbs
> DataStax
Re: describe keyspace or column family query not working
Posted by Tyler Hobbs <ty...@datastax.com>.
On Wed, Apr 10, 2013 at 11:09 AM, Vivek Mishra <mi...@gmail.com>wrote:
> Ok. A column family and keyspace created via cqlsh using cql3 is visible
> via cassandra-cli or thrift API?
The column family will only be visible via cassandra-cli and the Thrift API
if it was created WITH COMPACT STORAGE:
http://www.datastax.com/docs/1.2/cql_cli/cql/CREATE_TABLE#using-compact-storage
--
Tyler Hobbs
DataStax <http://datastax.com/>
Re: describe keyspace or column family query not working
Posted by Vivek Mishra <mi...@gmail.com>.
Ok. A column family and keyspace created via cqlsh using cql3 is visible
via cassandra-cli or thrift API?
-Vivek
On Wed, Apr 10, 2013 at 9:23 PM, Tyler Hobbs <ty...@datastax.com> wrote:
> "DESCRIBE" is a cqlsh feature, not a part of the CQL language.
>
>
> On Wed, Apr 10, 2013 at 2:37 AM, Kuldeep Mishra <ku...@gmail.com>wrote:
>
>> Hi ,
>> I am trying to execute following query but not working and throwing
>> exception
>>
>> QUERY:--
>> Cassandra.Client client;
>> client.execute_cql3_query(ByteBuffer.wrap("describe keyspace
>> mykeyspace".getBytes(Constants.CHARSET_UTF8)), Compression.NONE,
>> ConsistencyLevel.ONE);
>>
>> client.execute_cql3_query(ByteBuffer.wrap("describe table
>> mytable".getBytes(Constants.CHARSET_UTF8)), Compression.NONE,
>> ConsistencyLevel.ONE);
>>
>> but both query giving following exception,
>>
>> STACK TRACE
>>
>> InvalidRequestException(why:line 1:0 no viable alternative at input
>> 'describe')
>> at
>> org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result.read(Cassandra.java:37849)
>> at
>> org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
>> at
>> org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql3_query(Cassandra.java:1562)
>> at
>> org.apache.cassandra.thrift.Cassandra$Client.execute_cql3_query(Cassandra.java:1547)
>>
>> Please help..
>>
>>
>> Thanks and Regards
>> Kuldeep
>>
>>
>>
>>
>>
>>
>> --
>> Thanks and Regards
>> Kuldeep Kumar Mishra
>> +919540965199
>>
>
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>
Re: describe keyspace or column family query not working
Posted by Tyler Hobbs <ty...@datastax.com>.
"DESCRIBE" is a cqlsh feature, not a part of the CQL language.
On Wed, Apr 10, 2013 at 2:37 AM, Kuldeep Mishra <ku...@gmail.com>wrote:
> Hi ,
> I am trying to execute following query but not working and throwing
> exception
>
> QUERY:--
> Cassandra.Client client;
> client.execute_cql3_query(ByteBuffer.wrap("describe keyspace
> mykeyspace".getBytes(Constants.CHARSET_UTF8)), Compression.NONE,
> ConsistencyLevel.ONE);
>
> client.execute_cql3_query(ByteBuffer.wrap("describe table
> mytable".getBytes(Constants.CHARSET_UTF8)), Compression.NONE,
> ConsistencyLevel.ONE);
>
> but both query giving following exception,
>
> STACK TRACE
>
> InvalidRequestException(why:line 1:0 no viable alternative at input
> 'describe')
> at
> org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result.read(Cassandra.java:37849)
> at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
> at
> org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql3_query(Cassandra.java:1562)
> at
> org.apache.cassandra.thrift.Cassandra$Client.execute_cql3_query(Cassandra.java:1547)
>
> Please help..
>
>
> Thanks and Regards
> Kuldeep
>
>
>
>
>
>
> --
> Thanks and Regards
> Kuldeep Kumar Mishra
> +919540965199
>
--
Tyler Hobbs
DataStax <http://datastax.com/>