incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Mishra <vivek.mis...@yahoo.com>
Subject Re: Compund/Composite column names
Date Tue, 09 Oct 2012 02:29:57 GMT
Nothing on server log. Only difference is i tried to create a compound key using 3 composite
columns, whereas example on website is with 2.

When i try to connect via cassandra-cli, i am able to connect but this column family is not
available. 

So i guess, this might be an issue with CQL3, not with cassandra server?

-Vivek


________________________________
 From: Brandon Williams <driftx@gmail.com>
To: dev@cassandra.apache.org; Vivek Mishra <vivek.mishra@yahoo.com> 
Sent: Tuesday, October 9, 2012 7:50 AM
Subject: Re: Compund/Composite column names
 
Check for a stacktrace in the server log.

On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vivek.mishra@yahoo.com> wrote:
> Hi All,
>
> I am trying to use compound primary key column name and i am referring to:
> http://www.datastax.com/dev/blog/whats-new-in-cql-3-0
>
>
> As mentioned on this example, i tried to create a column family containing compound primary
key (one or more) as:
>
>  CREATE TABLE altercations (
>        instigator text,
>        started_at timestamp,
>        ships_destroyed int,
>        energy_used float,
>        alliance_involvement boolean,
>        PRIMARY KEY (instigator,started_at,ships_destroyed)
>    );
>
> And i am getting:
>
>
> **********************************************************************
> TSocket read 0 bytes
> cqlsh:testcomp>
> **********************************************************************
>
>
> Then followed by insert and select statements giving me following errors:
>
> ********************************************************************************************************************************************
>
> cqlsh:testcomp>    INSERT INTO altercations (instigator, started_at, ships_destroyed,
>             ...                              energy_used, alliance_involvement)
>             ...                      VALUES ('Jayne Cobb', '2012-07-23',
2, 4.6, 'false');
> TSocket read 0 bytes
>
> cqlsh:testcomp> select * from altercations;
> Traceback (most recent call last):
>   File "bin/cqlsh", line 1008, in perform_statement
>     self.cursor.execute(statement, decoder=decoder)
>   File "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cursor.py", line 117,
in execute
>     response = self.handle_cql_execution_errors(doquery, prepared_q, compress)
>   File "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cursor.py", line 132,
in handle_cql_execution_errors
>     return executor(*args, **kwargs)
>   File "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cassandra/Cassandra.py",
line 1583, in execute_cql_query
>     self.send_execute_cql_query(query, compression)
>   File "bin/../lib/cql-internal-only-1.0.10.zip/cql-1.0.10/cql/cassandra/Cassandra.py",
line 1593, in send_execute_cql_query
>     self._oprot.trans.flush()
>   File "bin/../lib/thrift-python-internal-only-0.7.0.zip/thrift/transport/TTransport.py",
line 293, in flush
>     self.__trans.write(buf)
>   File "bin/../lib/thrift-python-internal-only-0.7.0.zip/thrift/transport/TSocket.py",
line 117, in write
>     plus = self.handle.send(buff)
> error: [Errno 32] Broken pipe
>
> cqlsh:testcomp>
>
> ********************************************************************************************************************************************
>
>
>
> Any idea?
>
>
> -Vivek
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message