Re: describe keyspace or column family query not working

2013-04-11 Thread aaron morton
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 mishra.v...@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



describe keyspace or column family query not working

2013-04-10 Thread Kuldeep Mishra
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

2013-04-10 Thread Tyler Hobbs
DESCRIBE is a cqlsh feature, not a part of the CQL language.


On Wed, Apr 10, 2013 at 2:37 AM, Kuldeep Mishra kuld.cs.mis...@gmail.comwrote:

 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

2013-04-10 Thread Vivek Mishra
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 
 kuld.cs.mis...@gmail.comwrote:

 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

2013-04-10 Thread Tyler Hobbs
On Wed, Apr 10, 2013 at 11:09 AM, Vivek Mishra mishra.v...@gmail.comwrote:

 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/