You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by Jonathan Ellis <jb...@gmail.com> on 2012/09/25 19:16:07 UTC
Pushing Cassandra 1.2 back a month to November?
We are more or less on track for the promised late October 1.2 release
[1] but I'm starting to think we should expand the scope of 1.2 a bit
to get cql3 and the corresponding binary protocol truly "right."
Specifically,
1) We'd like to move the consistency level setting from the CQL
language to the protocol level.
2) The binary protocol only really has a Java implementation so far.
Having the time to flesh out the Python implementation would be a good
sanity check before we commit to protocol stability.
Additionally,
3) vnodes is a big change that could use more time to test. I'd like
to avoid a repeat of the schema change mess from 1.1, where we did a
substantial rewrite that took six minor releases to get all the bugs
out of.
Gory details on the CQL situation:
Currently, in CQL3, you set the consistency level of an operation in
the language, eg 'SELECT * FROM foo USING CONSISTENCY QUORUM'. It now
looks like this was a mistake, and that consistency should be set at
the protocol level, i.e. as a separate parameter along with the query.
The reasoning is that the CL applies to the guarantee provided by the
operation being successful, not to the query itself. Specifically,
having the CL being part of the language means that CL is opaque to
low level client libraries without themselves parsing the CQL, which
we want to avoid. Thus,
- Those libraries can't implement automatic retries policy, where a query
would be retried with a smaller CL. (I'm aware that this is often a
Bad Idea, but it does have legitimate uses and not having that available
is seen as a regression from the Thrift api.)
- We had to introduce CASSANDRA-4448 to allow the client to configure some
form of default CL since the library can't handle that anymore, which is
hackish.
- Executing prepared statements with different CL requires preparing
multiple statements.
- CL only makes sense for BATCH operations as a whole, not the
sub-statements within the batch. Currently CQL3 "fixes" that by
validating the given CLs match, but it would be much more clear
if the CL was on the protocol side.
Moving the CL to the protocol level solves all of that but the problem
is, if we move the CL from the language to the protocol after 1.2,
that's a breaking change of CQL3, so we're talking CQL4. Bad idea.
[1] although later-than-planned freeze is a warning sign
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Pushing Cassandra 1.2 back a month to November?
Posted by Jonathan Ellis <jb...@gmail.com>.
All right. With no dissenting opinions, let's make this the new plan of record.
I've created https://issues.apache.org/jira/browse/CASSANDRA-4734 for
the protocol change; let's get that into beta2 and take it from there.
On Wed, Sep 26, 2012 at 8:22 AM, Brandon Williams <dr...@gmail.com> wrote:
> +1
>
> The vnode troubleshooting process has been rough, so I'm all for more
> testing there.
>
> On Tue, Sep 25, 2012 at 12:16 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>> We are more or less on track for the promised late October 1.2 release
>> [1] but I'm starting to think we should expand the scope of 1.2 a bit
>> to get cql3 and the corresponding binary protocol truly "right."
>>
>> Specifically,
>> 1) We'd like to move the consistency level setting from the CQL
>> language to the protocol level.
>> 2) The binary protocol only really has a Java implementation so far.
>> Having the time to flesh out the Python implementation would be a good
>> sanity check before we commit to protocol stability.
>>
>> Additionally,
>> 3) vnodes is a big change that could use more time to test. I'd like
>> to avoid a repeat of the schema change mess from 1.1, where we did a
>> substantial rewrite that took six minor releases to get all the bugs
>> out of.
>>
>> Gory details on the CQL situation:
>>
>> Currently, in CQL3, you set the consistency level of an operation in
>> the language, eg 'SELECT * FROM foo USING CONSISTENCY QUORUM'. It now
>> looks like this was a mistake, and that consistency should be set at
>> the protocol level, i.e. as a separate parameter along with the query.
>>
>> The reasoning is that the CL applies to the guarantee provided by the
>> operation being successful, not to the query itself. Specifically,
>> having the CL being part of the language means that CL is opaque to
>> low level client libraries without themselves parsing the CQL, which
>> we want to avoid. Thus,
>>
>> - Those libraries can't implement automatic retries policy, where a query
>> would be retried with a smaller CL. (I'm aware that this is often a
>> Bad Idea, but it does have legitimate uses and not having that available
>> is seen as a regression from the Thrift api.)
>> - We had to introduce CASSANDRA-4448 to allow the client to configure some
>> form of default CL since the library can't handle that anymore, which is
>> hackish.
>> - Executing prepared statements with different CL requires preparing
>> multiple statements.
>> - CL only makes sense for BATCH operations as a whole, not the
>> sub-statements within the batch. Currently CQL3 "fixes" that by
>> validating the given CLs match, but it would be much more clear
>> if the CL was on the protocol side.
>>
>> Moving the CL to the protocol level solves all of that but the problem
>> is, if we move the CL from the language to the protocol after 1.2,
>> that's a breaking change of CQL3, so we're talking CQL4. Bad idea.
>>
>> [1] although later-than-planned freeze is a warning sign
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Pushing Cassandra 1.2 back a month to November?
Posted by Brandon Williams <dr...@gmail.com>.
+1
The vnode troubleshooting process has been rough, so I'm all for more
testing there.
On Tue, Sep 25, 2012 at 12:16 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> We are more or less on track for the promised late October 1.2 release
> [1] but I'm starting to think we should expand the scope of 1.2 a bit
> to get cql3 and the corresponding binary protocol truly "right."
>
> Specifically,
> 1) We'd like to move the consistency level setting from the CQL
> language to the protocol level.
> 2) The binary protocol only really has a Java implementation so far.
> Having the time to flesh out the Python implementation would be a good
> sanity check before we commit to protocol stability.
>
> Additionally,
> 3) vnodes is a big change that could use more time to test. I'd like
> to avoid a repeat of the schema change mess from 1.1, where we did a
> substantial rewrite that took six minor releases to get all the bugs
> out of.
>
> Gory details on the CQL situation:
>
> Currently, in CQL3, you set the consistency level of an operation in
> the language, eg 'SELECT * FROM foo USING CONSISTENCY QUORUM'. It now
> looks like this was a mistake, and that consistency should be set at
> the protocol level, i.e. as a separate parameter along with the query.
>
> The reasoning is that the CL applies to the guarantee provided by the
> operation being successful, not to the query itself. Specifically,
> having the CL being part of the language means that CL is opaque to
> low level client libraries without themselves parsing the CQL, which
> we want to avoid. Thus,
>
> - Those libraries can't implement automatic retries policy, where a query
> would be retried with a smaller CL. (I'm aware that this is often a
> Bad Idea, but it does have legitimate uses and not having that available
> is seen as a regression from the Thrift api.)
> - We had to introduce CASSANDRA-4448 to allow the client to configure some
> form of default CL since the library can't handle that anymore, which is
> hackish.
> - Executing prepared statements with different CL requires preparing
> multiple statements.
> - CL only makes sense for BATCH operations as a whole, not the
> sub-statements within the batch. Currently CQL3 "fixes" that by
> validating the given CLs match, but it would be much more clear
> if the CL was on the protocol side.
>
> Moving the CL to the protocol level solves all of that but the problem
> is, if we move the CL from the language to the protocol after 1.2,
> that's a breaking change of CQL3, so we're talking CQL4. Bad idea.
>
> [1] although later-than-planned freeze is a warning sign
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
Re: Pushing Cassandra 1.2 back a month to November?
Posted by Pavel Yaskevich <po...@gmail.com>.
+1
26 sep 2012 kl. 15:56 skrev Sylvain Lebresne <sy...@datastax.com>:
> +1
>
> On Tue, Sep 25, 2012 at 7:16 PM, Jonathan Ellis <jb...@gmail.com> wrote:
>> We are more or less on track for the promised late October 1.2 release
>> [1] but I'm starting to think we should expand the scope of 1.2 a bit
>> to get cql3 and the corresponding binary protocol truly "right."
>>
>> Specifically,
>> 1) We'd like to move the consistency level setting from the CQL
>> language to the protocol level.
>> 2) The binary protocol only really has a Java implementation so far.
>> Having the time to flesh out the Python implementation would be a good
>> sanity check before we commit to protocol stability.
>>
>> Additionally,
>> 3) vnodes is a big change that could use more time to test. I'd like
>> to avoid a repeat of the schema change mess from 1.1, where we did a
>> substantial rewrite that took six minor releases to get all the bugs
>> out of.
>>
>> Gory details on the CQL situation:
>>
>> Currently, in CQL3, you set the consistency level of an operation in
>> the language, eg 'SELECT * FROM foo USING CONSISTENCY QUORUM'. It now
>> looks like this was a mistake, and that consistency should be set at
>> the protocol level, i.e. as a separate parameter along with the query.
>>
>> The reasoning is that the CL applies to the guarantee provided by the
>> operation being successful, not to the query itself. Specifically,
>> having the CL being part of the language means that CL is opaque to
>> low level client libraries without themselves parsing the CQL, which
>> we want to avoid. Thus,
>>
>> - Those libraries can't implement automatic retries policy, where a query
>> would be retried with a smaller CL. (I'm aware that this is often a
>> Bad Idea, but it does have legitimate uses and not having that available
>> is seen as a regression from the Thrift api.)
>> - We had to introduce CASSANDRA-4448 to allow the client to configure some
>> form of default CL since the library can't handle that anymore, which is
>> hackish.
>> - Executing prepared statements with different CL requires preparing
>> multiple statements.
>> - CL only makes sense for BATCH operations as a whole, not the
>> sub-statements within the batch. Currently CQL3 "fixes" that by
>> validating the given CLs match, but it would be much more clear
>> if the CL was on the protocol side.
>>
>> Moving the CL to the protocol level solves all of that but the problem
>> is, if we move the CL from the language to the protocol after 1.2,
>> that's a breaking change of CQL3, so we're talking CQL4. Bad idea.
>>
>> [1] although later-than-planned freeze is a warning sign
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
Re: Pushing Cassandra 1.2 back a month to November?
Posted by Sylvain Lebresne <sy...@datastax.com>.
+1
On Tue, Sep 25, 2012 at 7:16 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> We are more or less on track for the promised late October 1.2 release
> [1] but I'm starting to think we should expand the scope of 1.2 a bit
> to get cql3 and the corresponding binary protocol truly "right."
>
> Specifically,
> 1) We'd like to move the consistency level setting from the CQL
> language to the protocol level.
> 2) The binary protocol only really has a Java implementation so far.
> Having the time to flesh out the Python implementation would be a good
> sanity check before we commit to protocol stability.
>
> Additionally,
> 3) vnodes is a big change that could use more time to test. I'd like
> to avoid a repeat of the schema change mess from 1.1, where we did a
> substantial rewrite that took six minor releases to get all the bugs
> out of.
>
> Gory details on the CQL situation:
>
> Currently, in CQL3, you set the consistency level of an operation in
> the language, eg 'SELECT * FROM foo USING CONSISTENCY QUORUM'. It now
> looks like this was a mistake, and that consistency should be set at
> the protocol level, i.e. as a separate parameter along with the query.
>
> The reasoning is that the CL applies to the guarantee provided by the
> operation being successful, not to the query itself. Specifically,
> having the CL being part of the language means that CL is opaque to
> low level client libraries without themselves parsing the CQL, which
> we want to avoid. Thus,
>
> - Those libraries can't implement automatic retries policy, where a query
> would be retried with a smaller CL. (I'm aware that this is often a
> Bad Idea, but it does have legitimate uses and not having that available
> is seen as a regression from the Thrift api.)
> - We had to introduce CASSANDRA-4448 to allow the client to configure some
> form of default CL since the library can't handle that anymore, which is
> hackish.
> - Executing prepared statements with different CL requires preparing
> multiple statements.
> - CL only makes sense for BATCH operations as a whole, not the
> sub-statements within the batch. Currently CQL3 "fixes" that by
> validating the given CLs match, but it would be much more clear
> if the CL was on the protocol side.
>
> Moving the CL to the protocol level solves all of that but the problem
> is, if we move the CL from the language to the protocol after 1.2,
> that's a breaking change of CQL3, so we're talking CQL4. Bad idea.
>
> [1] although later-than-planned freeze is a warning sign
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
Re: Compund/Composite column names
Posted by Vivek Mishra <vi...@yahoo.com>.
Just verified, basically column family itself is not getting created on very first place, as reconnecting cql client again does not show it.
-Vivek
________________________________
From: Vivek Mishra <vi...@yahoo.com>
To: "dev@cassandra.apache.org" <de...@cassandra.apache.org>
Sent: Tuesday, October 9, 2012 7:59 AM
Subject: Re: Compund/Composite column names
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 <dr...@gmail.com>
To: dev@cassandra.apache.org; Vivek Mishra <vi...@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 <vi...@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
Re: Compund/Composite column names
Posted by Vivek Mishra <vi...@yahoo.com>.
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 <dr...@gmail.com>
To: dev@cassandra.apache.org; Vivek Mishra <vi...@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 <vi...@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
Re: Compund/Composite column names
Posted by Brandon Williams <dr...@gmail.com>.
Check for a stacktrace in the server log.
On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
Re: Compund/Composite column names
Posted by Brian O'Neill <bo...@alumni.brown.edu>.
Sorry, just got time to submit it.
Here you go:
https://issues.apache.org/jira/browse/CASSANDRA-5138
-brian
---
Brian O'Neill
Lead Architect, Software Development
Health Market Science
The Science of Better Results
2700 Horizon Drive King of Prussia, PA 19406
M: 215.588.6024 @boneill42 <http://www.twitter.com/boneill42>
healthmarketscience.com
This information transmitted in this email message is for the intended
recipient only and may contain confidential and/or privileged material. If
you received this email in error and are not the intended recipient, or the
person responsible to deliver it to the intended recipient, please contact
the sender at the email above and delete this email and any attachments and
destroy any copies thereof. Any review, retransmission, dissemination,
copying or other use of, or taking any action in reliance upon, this
information by persons or entities other than the intended recipient is
strictly prohibited.
From: Sylvain Lebresne <sy...@datastax.com>
Date: Monday, December 17, 2012 10:35 AM
To: <de...@cassandra.apache.org>
Cc: Vivek Mishra <vi...@yahoo.com>, Brian O'Neill
<bo...@alumni.brown.edu>
Subject: Re: Compund/Composite column names
Feel free to open a ticket with steps to reproduce. We can certainly throw a
more meaningful exception.
On Mon, Dec 17, 2012 at 4:11 PM, Edward Capriolo <ed...@gmail.com>
wrote:
> This was discussed in one of the tickets. The problem is that CQL3's sparse
> tables is it has different metadata that has NOT been added to thrift's
> CFMetaData. Thus thrift is unaware of exactly how to verify the insert.
>
> Originally it was made impossible for thrift to see a sparse table (but
> that restriction has been lifted) it seems. It is probably a bad idea to
> thrift insert into a sparse table until Cassandra does not have two
> distinct sources of meta information.
>
>
>
>
>
> On Mon, Dec 17, 2012 at 9:52 AM, Vivek Mishra <vi...@yahoo.com>wrote:
>
>> > Looks like Thrift API is not working as expected?
>> >
>> > -Vivek
>> >
>> >
>> >
>> >
>> > ________________________________
>> > From: Brian O'Neill <bo...@alumni.brown.edu>
>> > To: dev@cassandra.apache.org
>> > Cc: Vivek Mishra <vi...@yahoo.com>
>> > Sent: Monday, December 17, 2012 8:12 PM
>> > Subject: Re: Compund/Composite column names
>> >
>> > FYI -- I'm still seeing this on 1.2-beta1.
>> >
>> > If you create a table via CQL, then insert into it (via Java API) with
>> > an incorrect number of components. The insert works, but select *
>> > from CQL results in a TSocket read error.
>> >
>> > I showed this in the webinar last week, just in case people ran into
>> > it. It would be great to translate the ArrayIndexOutofBoundsException
>> > from the server side into something meaningful in cqlsh to help people
>> > diagnose the problem. (a regular user probably doesn't have access to
>> > the server-side logs)
>> >
>> > You can see it at minute 41 in the video from the webinar:
>> > http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
>> >
>> > -brian
>> >
>> >
>> > On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>> > > Sounds like you're running into the keyspace drop bug. It's "mostly"
>> > fixed
>>> > > in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
>>> > > released soon with the final fix.
>>> > > On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
>>> > >
>>>> > >>
>>>> > >>
>>>> > >> Ok. I am able to understand the problem now. Issue is:
>>>> > >>
>>>> > >> If i create a column family altercations as:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> *****************************8
>>>> > >> CREATE TABLE altercations (
>>>> > >> instigator text,
>>>> > >> started_at timestamp,
>>>> > >> ships_destroyed int,
>>>> > >> energy_used float,
>>>> > >> alliance_involvement boolean,
>>>> > >> PRIMARY KEY (instigator,started_at,ships_destroyed)
>>>> > >> );
>>>> > >> /
>>>> > >> INSERT INTO altercations (instigator, started_at, ships_destroyed,
>>>> > >> energy_used, alliance_involvement)
>>>> > >> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6,
>> > 'false');
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> It works!
>>>> > >>
>>>> > >> But if i create a column family with compound primary key with 2
>> > composite
>>>> > >> column as:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >> CREATE TABLE altercations (
>>>> > >> instigator text,
>>>> > >> started_at timestamp,
>>>> > >> ships_destroyed int,
>>>> > >> energy_used float,
>>>> > >> alliance_involvement boolean,
>>>> > >> PRIMARY KEY (instigator,started_at)
>>>> > >> );
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >> and Then drop this column family:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >> drop columnfamily altercations;
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> and then try to create same one with primary compound key with 3
>> > composite
>>>> > >> column:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> CREATE TABLE altercations (
>>>> > >> instigator text,
>>>> > >> started_at timestamp,
>>>> > >> ships_destroyed int,
>>>> > >> energy_used float,
>>>> > >> alliance_involvement boolean,
>>>> > >> PRIMARY KEY (instigator,started_at,ships_destroyed)
>>>> > >> );
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> it gives me error: "TSocket read 0 bytes"
>>>> > >>
>>>> > >> Rest, as no column family is created, so nothing onwards will work.
>>>> > >>
>>>> > >> Is this an issue?
>>>> > >>
>>>> > >> -Vivek
>>>> > >>
>>>> > >>
>>>> > >> ________________________________
>>>> > >> From: Jonathan Ellis <jb...@gmail.com>
>>>> > >> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
>>>> > >> Sent: Tuesday, October 9, 2012 9:08 AM
>>>> > >> Subject: Re: Compund/Composite column names
>>>> > >>
>>>> > >> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse >>>>
error.
>>>> > >>
>>>> > >> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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.p>>
y",
>>>> > >> 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.p>>
y",
>>>> > >> 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
>>>> > >>
>>>> > >>
>>>> > >>
>>>> > >> --
>>>> > >> Jonathan Ellis
>>>> > >> Project Chair, Apache Cassandra
>>>> > >> co-founder of DataStax, the source for professional Cassandra support
>>>> > >> http://www.datastax.com
>> >
>> >
>> >
>> > --
>> > Brian ONeill
>> > Lead Architect, Health Market Science (http://healthmarketscience.com)
>> >
>> > mobile:215.588.6024 <tel:215.588.6024>
>> > blog: http://brianoneill.blogspot.com/
>> > twitter: @boneill42
Re: Compund/Composite column names
Posted by Brian O'Neill <bo...@alumni.brown.edu>.
Will do.
---
Brian O'Neill
Lead Architect, Software Development
Health Market Science
The Science of Better Results
2700 Horizon Drive King of Prussia, PA 19406
M: 215.588.6024 @boneill42 <http://www.twitter.com/boneill42>
healthmarketscience.com
This information transmitted in this email message is for the intended
recipient only and may contain confidential and/or privileged material. If
you received this email in error and are not the intended recipient, or the
person responsible to deliver it to the intended recipient, please contact
the sender at the email above and delete this email and any attachments and
destroy any copies thereof. Any review, retransmission, dissemination,
copying or other use of, or taking any action in reliance upon, this
information by persons or entities other than the intended recipient is
strictly prohibited.
From: Sylvain Lebresne <sy...@datastax.com>
Date: Monday, December 17, 2012 10:35 AM
To: <de...@cassandra.apache.org>
Cc: Vivek Mishra <vi...@yahoo.com>, Brian O'Neill
<bo...@alumni.brown.edu>
Subject: Re: Compund/Composite column names
Feel free to open a ticket with steps to reproduce. We can certainly throw a
more meaningful exception.
On Mon, Dec 17, 2012 at 4:11 PM, Edward Capriolo <ed...@gmail.com>
wrote:
> This was discussed in one of the tickets. The problem is that CQL3's sparse
> tables is it has different metadata that has NOT been added to thrift's
> CFMetaData. Thus thrift is unaware of exactly how to verify the insert.
>
> Originally it was made impossible for thrift to see a sparse table (but
> that restriction has been lifted) it seems. It is probably a bad idea to
> thrift insert into a sparse table until Cassandra does not have two
> distinct sources of meta information.
>
>
>
>
>
> On Mon, Dec 17, 2012 at 9:52 AM, Vivek Mishra <vi...@yahoo.com>wrote:
>
>> > Looks like Thrift API is not working as expected?
>> >
>> > -Vivek
>> >
>> >
>> >
>> >
>> > ________________________________
>> > From: Brian O'Neill <bo...@alumni.brown.edu>
>> > To: dev@cassandra.apache.org
>> > Cc: Vivek Mishra <vi...@yahoo.com>
>> > Sent: Monday, December 17, 2012 8:12 PM
>> > Subject: Re: Compund/Composite column names
>> >
>> > FYI -- I'm still seeing this on 1.2-beta1.
>> >
>> > If you create a table via CQL, then insert into it (via Java API) with
>> > an incorrect number of components. The insert works, but select *
>> > from CQL results in a TSocket read error.
>> >
>> > I showed this in the webinar last week, just in case people ran into
>> > it. It would be great to translate the ArrayIndexOutofBoundsException
>> > from the server side into something meaningful in cqlsh to help people
>> > diagnose the problem. (a regular user probably doesn't have access to
>> > the server-side logs)
>> >
>> > You can see it at minute 41 in the video from the webinar:
>> > http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
>> >
>> > -brian
>> >
>> >
>> > On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>>> > > Sounds like you're running into the keyspace drop bug. It's "mostly"
>> > fixed
>>> > > in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
>>> > > released soon with the final fix.
>>> > > On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
>>> > >
>>>> > >>
>>>> > >>
>>>> > >> Ok. I am able to understand the problem now. Issue is:
>>>> > >>
>>>> > >> If i create a column family altercations as:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> *****************************8
>>>> > >> CREATE TABLE altercations (
>>>> > >> instigator text,
>>>> > >> started_at timestamp,
>>>> > >> ships_destroyed int,
>>>> > >> energy_used float,
>>>> > >> alliance_involvement boolean,
>>>> > >> PRIMARY KEY (instigator,started_at,ships_destroyed)
>>>> > >> );
>>>> > >> /
>>>> > >> INSERT INTO altercations (instigator, started_at, ships_destroyed,
>>>> > >> energy_used, alliance_involvement)
>>>> > >> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6,
>> > 'false');
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> It works!
>>>> > >>
>>>> > >> But if i create a column family with compound primary key with 2
>> > composite
>>>> > >> column as:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >> CREATE TABLE altercations (
>>>> > >> instigator text,
>>>> > >> started_at timestamp,
>>>> > >> ships_destroyed int,
>>>> > >> energy_used float,
>>>> > >> alliance_involvement boolean,
>>>> > >> PRIMARY KEY (instigator,started_at)
>>>> > >> );
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >> and Then drop this column family:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >> drop columnfamily altercations;
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> and then try to create same one with primary compound key with 3
>> > composite
>>>> > >> column:
>>>> > >>
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> CREATE TABLE altercations (
>>>> > >> instigator text,
>>>> > >> started_at timestamp,
>>>> > >> ships_destroyed int,
>>>> > >> energy_used float,
>>>> > >> alliance_involvement boolean,
>>>> > >> PRIMARY KEY (instigator,started_at,ships_destroyed)
>>>> > >> );
>>>> > >>
>>>> > >>
>> >
>> *****************************************************************************
>> ****************************************
>>>> > >>
>>>> > >> it gives me error: "TSocket read 0 bytes"
>>>> > >>
>>>> > >> Rest, as no column family is created, so nothing onwards will work.
>>>> > >>
>>>> > >> Is this an issue?
>>>> > >>
>>>> > >> -Vivek
>>>> > >>
>>>> > >>
>>>> > >> ________________________________
>>>> > >> From: Jonathan Ellis <jb...@gmail.com>
>>>> > >> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
>>>> > >> Sent: Tuesday, October 9, 2012 9:08 AM
>>>> > >> Subject: Re: Compund/Composite column names
>>>> > >>
>>>> > >> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse >>>>
error.
>>>> > >>
>>>> > >> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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.p>>
y",
>>>> > >> 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.p>>
y",
>>>> > >> 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
>>>> > >>
>>>> > >>
>>>> > >>
>>>> > >> --
>>>> > >> Jonathan Ellis
>>>> > >> Project Chair, Apache Cassandra
>>>> > >> co-founder of DataStax, the source for professional Cassandra support
>>>> > >> http://www.datastax.com
>> >
>> >
>> >
>> > --
>> > Brian ONeill
>> > Lead Architect, Health Market Science (http://healthmarketscience.com)
>> >
>> > mobile:215.588.6024 <tel:215.588.6024>
>> > blog: http://brianoneill.blogspot.com/
>> > twitter: @boneill42
Re: Compund/Composite column names
Posted by Sylvain Lebresne <sy...@datastax.com>.
Feel free to open a ticket with steps to reproduce. We can certainly throw
a more meaningful exception.
On Mon, Dec 17, 2012 at 4:11 PM, Edward Capriolo <ed...@gmail.com>wrote:
> This was discussed in one of the tickets. The problem is that CQL3's sparse
> tables is it has different metadata that has NOT been added to thrift's
> CFMetaData. Thus thrift is unaware of exactly how to verify the insert.
>
> Originally it was made impossible for thrift to see a sparse table (but
> that restriction has been lifted) it seems. It is probably a bad idea to
> thrift insert into a sparse table until Cassandra does not have two
> distinct sources of meta information.
>
>
>
>
>
> On Mon, Dec 17, 2012 at 9:52 AM, Vivek Mishra <vivek.mishra@yahoo.com
> >wrote:
>
> > Looks like Thrift API is not working as expected?
> >
> > -Vivek
> >
> >
> >
> >
> > ________________________________
> > From: Brian O'Neill <bo...@alumni.brown.edu>
> > To: dev@cassandra.apache.org
> > Cc: Vivek Mishra <vi...@yahoo.com>
> > Sent: Monday, December 17, 2012 8:12 PM
> > Subject: Re: Compund/Composite column names
> >
> > FYI -- I'm still seeing this on 1.2-beta1.
> >
> > If you create a table via CQL, then insert into it (via Java API) with
> > an incorrect number of components. The insert works, but select *
> > from CQL results in a TSocket read error.
> >
> > I showed this in the webinar last week, just in case people ran into
> > it. It would be great to translate the ArrayIndexOutofBoundsException
> > from the server side into something meaningful in cqlsh to help people
> > diagnose the problem. (a regular user probably doesn't have access to
> > the server-side logs)
> >
> > You can see it at minute 41 in the video from the webinar:
> > http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
> >
> > -brian
> >
> >
> > On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com>
> wrote:
> > > Sounds like you're running into the keyspace drop bug. It's "mostly"
> > fixed
> > > in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
> > > released soon with the final fix.
> > > On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
> > >
> > >>
> > >>
> > >> Ok. I am able to understand the problem now. Issue is:
> > >>
> > >> If i create a column family altercations as:
> > >>
> > >>
> > >>
> >
> **********************************************************************************************************8
> > >> CREATE TABLE altercations (
> > >> instigator text,
> > >> started_at timestamp,
> > >> ships_destroyed int,
> > >> energy_used float,
> > >> alliance_involvement boolean,
> > >> PRIMARY KEY (instigator,started_at,ships_destroyed)
> > >> );
> > >> /
> > >> INSERT INTO altercations (instigator, started_at, ships_destroyed,
> > >> energy_used, alliance_involvement)
> > >> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6,
> > 'false');
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >>
> > >> It works!
> > >>
> > >> But if i create a column family with compound primary key with 2
> > composite
> > >> column as:
> > >>
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >> CREATE TABLE altercations (
> > >> instigator text,
> > >> started_at timestamp,
> > >> ships_destroyed int,
> > >> energy_used float,
> > >> alliance_involvement boolean,
> > >> PRIMARY KEY (instigator,started_at)
> > >> );
> > >>
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >> and Then drop this column family:
> > >>
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >> drop columnfamily altercations;
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >>
> > >> and then try to create same one with primary compound key with 3
> > composite
> > >> column:
> > >>
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >>
> > >> CREATE TABLE altercations (
> > >> instigator text,
> > >> started_at timestamp,
> > >> ships_destroyed int,
> > >> energy_used float,
> > >> alliance_involvement boolean,
> > >> PRIMARY KEY (instigator,started_at,ships_destroyed)
> > >> );
> > >>
> > >>
> >
> *********************************************************************************************************************
> > >>
> > >> it gives me error: "TSocket read 0 bytes"
> > >>
> > >> Rest, as no column family is created, so nothing onwards will work.
> > >>
> > >> Is this an issue?
> > >>
> > >> -Vivek
> > >>
> > >>
> > >> ________________________________
> > >> From: Jonathan Ellis <jb...@gmail.com>
> > >> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
> > >> Sent: Tuesday, October 9, 2012 9:08 AM
> > >> Subject: Re: Compund/Composite column names
> > >>
> > >> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse
> error.
> > >>
> > >> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
> > >>
> > >>
> > >>
> > >> --
> > >> Jonathan Ellis
> > >> Project Chair, Apache Cassandra
> > >> co-founder of DataStax, the source for professional Cassandra support
> > >> http://www.datastax.com
> >
> >
> >
> > --
> > Brian ONeill
> > Lead Architect, Health Market Science (http://healthmarketscience.com)
> >
> > mobile:215.588.6024
> > blog: http://brianoneill.blogspot.com/
> > twitter: @boneill42
>
Re: Compund/Composite column names
Posted by Jonathan Ellis <jb...@gmail.com>.
You are confusing client-side and server-side validation. The server
should validate thrift inserts against cql3 table to prevent
egregiously malformed data, per the discussion on [1]. (Of course
even on the server we're limited to "this bunch of bytes here could
probably be an int" but that should be enough to prevent AIOBE.)
So if rc1 has validation problems, we should be able to fix that. (An
example with the cli would be easiest to address.)
[1] https://issues.apache.org/jira/browse/CASSANDRA-4377?focusedCommentId=13446499&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13446499
On Mon, Dec 17, 2012 at 9:11 AM, Edward Capriolo <ed...@gmail.com> wrote:
> This was discussed in one of the tickets. The problem is that CQL3's sparse
> tables is it has different metadata that has NOT been added to thrift's
> CFMetaData. Thus thrift is unaware of exactly how to verify the insert.
>
> Originally it was made impossible for thrift to see a sparse table (but
> that restriction has been lifted) it seems. It is probably a bad idea to
> thrift insert into a sparse table until Cassandra does not have two
> distinct sources of meta information.
>
>
>
>
>
> On Mon, Dec 17, 2012 at 9:52 AM, Vivek Mishra <vi...@yahoo.com>wrote:
>
>> Looks like Thrift API is not working as expected?
>>
>> -Vivek
>>
>>
>>
>>
>> ________________________________
>> From: Brian O'Neill <bo...@alumni.brown.edu>
>> To: dev@cassandra.apache.org
>> Cc: Vivek Mishra <vi...@yahoo.com>
>> Sent: Monday, December 17, 2012 8:12 PM
>> Subject: Re: Compund/Composite column names
>>
>> FYI -- I'm still seeing this on 1.2-beta1.
>>
>> If you create a table via CQL, then insert into it (via Java API) with
>> an incorrect number of components. The insert works, but select *
>> from CQL results in a TSocket read error.
>>
>> I showed this in the webinar last week, just in case people ran into
>> it. It would be great to translate the ArrayIndexOutofBoundsException
>> from the server side into something meaningful in cqlsh to help people
>> diagnose the problem. (a regular user probably doesn't have access to
>> the server-side logs)
>>
>> You can see it at minute 41 in the video from the webinar:
>> http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
>>
>> -brian
>>
>>
>> On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com> wrote:
>> > Sounds like you're running into the keyspace drop bug. It's "mostly"
>> fixed
>> > in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
>> > released soon with the final fix.
>> > On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
>> >
>> >>
>> >>
>> >> Ok. I am able to understand the problem now. Issue is:
>> >>
>> >> If i create a column family altercations as:
>> >>
>> >>
>> >>
>> **********************************************************************************************************8
>> >> CREATE TABLE altercations (
>> >> instigator text,
>> >> started_at timestamp,
>> >> ships_destroyed int,
>> >> energy_used float,
>> >> alliance_involvement boolean,
>> >> PRIMARY KEY (instigator,started_at,ships_destroyed)
>> >> );
>> >> /
>> >> INSERT INTO altercations (instigator, started_at, ships_destroyed,
>> >> energy_used, alliance_involvement)
>> >> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6,
>> 'false');
>> >>
>> >>
>> *********************************************************************************************************************
>> >>
>> >> It works!
>> >>
>> >> But if i create a column family with compound primary key with 2
>> composite
>> >> column as:
>> >>
>> >>
>> >>
>> *********************************************************************************************************************
>> >> CREATE TABLE altercations (
>> >> instigator text,
>> >> started_at timestamp,
>> >> ships_destroyed int,
>> >> energy_used float,
>> >> alliance_involvement boolean,
>> >> PRIMARY KEY (instigator,started_at)
>> >> );
>> >>
>> >>
>> >>
>> *********************************************************************************************************************
>> >> and Then drop this column family:
>> >>
>> >>
>> >>
>> *********************************************************************************************************************
>> >> drop columnfamily altercations;
>> >>
>> >>
>> *********************************************************************************************************************
>> >>
>> >> and then try to create same one with primary compound key with 3
>> composite
>> >> column:
>> >>
>> >>
>> >>
>> *********************************************************************************************************************
>> >>
>> >> CREATE TABLE altercations (
>> >> instigator text,
>> >> started_at timestamp,
>> >> ships_destroyed int,
>> >> energy_used float,
>> >> alliance_involvement boolean,
>> >> PRIMARY KEY (instigator,started_at,ships_destroyed)
>> >> );
>> >>
>> >>
>> *********************************************************************************************************************
>> >>
>> >> it gives me error: "TSocket read 0 bytes"
>> >>
>> >> Rest, as no column family is created, so nothing onwards will work.
>> >>
>> >> Is this an issue?
>> >>
>> >> -Vivek
>> >>
>> >>
>> >> ________________________________
>> >> From: Jonathan Ellis <jb...@gmail.com>
>> >> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
>> >> Sent: Tuesday, October 9, 2012 9:08 AM
>> >> Subject: Re: Compund/Composite column names
>> >>
>> >> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
>> >>
>> >> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
>> >>
>> >>
>> >>
>> >> --
>> >> Jonathan Ellis
>> >> Project Chair, Apache Cassandra
>> >> co-founder of DataStax, the source for professional Cassandra support
>> >> http://www.datastax.com
>>
>>
>>
>> --
>> Brian ONeill
>> Lead Architect, Health Market Science (http://healthmarketscience.com)
>>
>> mobile:215.588.6024
>> blog: http://brianoneill.blogspot.com/
>> twitter: @boneill42
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://www.datastax.com
@spyced
Re: Compund/Composite column names
Posted by Edward Capriolo <ed...@gmail.com>.
This was discussed in one of the tickets. The problem is that CQL3's sparse
tables is it has different metadata that has NOT been added to thrift's
CFMetaData. Thus thrift is unaware of exactly how to verify the insert.
Originally it was made impossible for thrift to see a sparse table (but
that restriction has been lifted) it seems. It is probably a bad idea to
thrift insert into a sparse table until Cassandra does not have two
distinct sources of meta information.
On Mon, Dec 17, 2012 at 9:52 AM, Vivek Mishra <vi...@yahoo.com>wrote:
> Looks like Thrift API is not working as expected?
>
> -Vivek
>
>
>
>
> ________________________________
> From: Brian O'Neill <bo...@alumni.brown.edu>
> To: dev@cassandra.apache.org
> Cc: Vivek Mishra <vi...@yahoo.com>
> Sent: Monday, December 17, 2012 8:12 PM
> Subject: Re: Compund/Composite column names
>
> FYI -- I'm still seeing this on 1.2-beta1.
>
> If you create a table via CQL, then insert into it (via Java API) with
> an incorrect number of components. The insert works, but select *
> from CQL results in a TSocket read error.
>
> I showed this in the webinar last week, just in case people ran into
> it. It would be great to translate the ArrayIndexOutofBoundsException
> from the server side into something meaningful in cqlsh to help people
> diagnose the problem. (a regular user probably doesn't have access to
> the server-side logs)
>
> You can see it at minute 41 in the video from the webinar:
> http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
>
> -brian
>
>
> On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> > Sounds like you're running into the keyspace drop bug. It's "mostly"
> fixed
> > in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
> > released soon with the final fix.
> > On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
> >
> >>
> >>
> >> Ok. I am able to understand the problem now. Issue is:
> >>
> >> If i create a column family altercations as:
> >>
> >>
> >>
> **********************************************************************************************************8
> >> CREATE TABLE altercations (
> >> instigator text,
> >> started_at timestamp,
> >> ships_destroyed int,
> >> energy_used float,
> >> alliance_involvement boolean,
> >> PRIMARY KEY (instigator,started_at,ships_destroyed)
> >> );
> >> /
> >> INSERT INTO altercations (instigator, started_at, ships_destroyed,
> >> energy_used, alliance_involvement)
> >> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6,
> 'false');
> >>
> >>
> *********************************************************************************************************************
> >>
> >> It works!
> >>
> >> But if i create a column family with compound primary key with 2
> composite
> >> column as:
> >>
> >>
> >>
> *********************************************************************************************************************
> >> CREATE TABLE altercations (
> >> instigator text,
> >> started_at timestamp,
> >> ships_destroyed int,
> >> energy_used float,
> >> alliance_involvement boolean,
> >> PRIMARY KEY (instigator,started_at)
> >> );
> >>
> >>
> >>
> *********************************************************************************************************************
> >> and Then drop this column family:
> >>
> >>
> >>
> *********************************************************************************************************************
> >> drop columnfamily altercations;
> >>
> >>
> *********************************************************************************************************************
> >>
> >> and then try to create same one with primary compound key with 3
> composite
> >> column:
> >>
> >>
> >>
> *********************************************************************************************************************
> >>
> >> CREATE TABLE altercations (
> >> instigator text,
> >> started_at timestamp,
> >> ships_destroyed int,
> >> energy_used float,
> >> alliance_involvement boolean,
> >> PRIMARY KEY (instigator,started_at,ships_destroyed)
> >> );
> >>
> >>
> *********************************************************************************************************************
> >>
> >> it gives me error: "TSocket read 0 bytes"
> >>
> >> Rest, as no column family is created, so nothing onwards will work.
> >>
> >> Is this an issue?
> >>
> >> -Vivek
> >>
> >>
> >> ________________________________
> >> From: Jonathan Ellis <jb...@gmail.com>
> >> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
> >> Sent: Tuesday, October 9, 2012 9:08 AM
> >> Subject: Re: Compund/Composite column names
> >>
> >> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
> >>
> >> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
> >>
> >>
> >>
> >> --
> >> Jonathan Ellis
> >> Project Chair, Apache Cassandra
> >> co-founder of DataStax, the source for professional Cassandra support
> >> http://www.datastax.com
>
>
>
> --
> Brian ONeill
> Lead Architect, Health Market Science (http://healthmarketscience.com)
>
> mobile:215.588.6024
> blog: http://brianoneill.blogspot.com/
> twitter: @boneill42
Re: Compund/Composite column names
Posted by Vivek Mishra <vi...@yahoo.com>.
Looks like Thrift API is not working as expected?
-Vivek
________________________________
From: Brian O'Neill <bo...@alumni.brown.edu>
To: dev@cassandra.apache.org
Cc: Vivek Mishra <vi...@yahoo.com>
Sent: Monday, December 17, 2012 8:12 PM
Subject: Re: Compund/Composite column names
FYI -- I'm still seeing this on 1.2-beta1.
If you create a table via CQL, then insert into it (via Java API) with
an incorrect number of components. The insert works, but select *
from CQL results in a TSocket read error.
I showed this in the webinar last week, just in case people ran into
it. It would be great to translate the ArrayIndexOutofBoundsException
from the server side into something meaningful in cqlsh to help people
diagnose the problem. (a regular user probably doesn't have access to
the server-side logs)
You can see it at minute 41 in the video from the webinar:
http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
-brian
On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> Sounds like you're running into the keyspace drop bug. It's "mostly" fixed
> in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
> released soon with the final fix.
> On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
>
>>
>>
>> Ok. I am able to understand the problem now. Issue is:
>>
>> If i create a column family altercations as:
>>
>>
>> **********************************************************************************************************8
>> CREATE TABLE altercations (
>> instigator text,
>> started_at timestamp,
>> ships_destroyed int,
>> energy_used float,
>> alliance_involvement boolean,
>> PRIMARY KEY (instigator,started_at,ships_destroyed)
>> );
>> /
>> INSERT INTO altercations (instigator, started_at, ships_destroyed,
>> energy_used, alliance_involvement)
>> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6, 'false');
>>
>> *********************************************************************************************************************
>>
>> It works!
>>
>> But if i create a column family with compound primary key with 2 composite
>> column as:
>>
>>
>> *********************************************************************************************************************
>> CREATE TABLE altercations (
>> instigator text,
>> started_at timestamp,
>> ships_destroyed int,
>> energy_used float,
>> alliance_involvement boolean,
>> PRIMARY KEY (instigator,started_at)
>> );
>>
>>
>> *********************************************************************************************************************
>> and Then drop this column family:
>>
>>
>> *********************************************************************************************************************
>> drop columnfamily altercations;
>>
>> *********************************************************************************************************************
>>
>> and then try to create same one with primary compound key with 3 composite
>> column:
>>
>>
>> *********************************************************************************************************************
>>
>> CREATE TABLE altercations (
>> instigator text,
>> started_at timestamp,
>> ships_destroyed int,
>> energy_used float,
>> alliance_involvement boolean,
>> PRIMARY KEY (instigator,started_at,ships_destroyed)
>> );
>>
>> *********************************************************************************************************************
>>
>> it gives me error: "TSocket read 0 bytes"
>>
>> Rest, as no column family is created, so nothing onwards will work.
>>
>> Is this an issue?
>>
>> -Vivek
>>
>>
>> ________________________________
>> From: Jonathan Ellis <jb...@gmail.com>
>> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
>> Sent: Tuesday, October 9, 2012 9:08 AM
>> Subject: Re: Compund/Composite column names
>>
>> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
>>
>> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
--
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://brianoneill.blogspot.com/
twitter: @boneill42
Re: Compund/Composite column names
Posted by Brian O'Neill <bo...@alumni.brown.edu>.
FYI -- I'm still seeing this on 1.2-beta1.
If you create a table via CQL, then insert into it (via Java API) with
an incorrect number of components. The insert works, but select *
from CQL results in a TSocket read error.
I showed this in the webinar last week, just in case people ran into
it. It would be great to translate the ArrayIndexOutofBoundsException
from the server side into something meaningful in cqlsh to help people
diagnose the problem. (a regular user probably doesn't have access to
the server-side logs)
You can see it at minute 41 in the video from the webinar:
http://www.youtube.com/watch?v=AdfugJxfd0o&feature=youtu.be
-brian
On Tue, Oct 9, 2012 at 9:39 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> Sounds like you're running into the keyspace drop bug. It's "mostly" fixed
> in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
> released soon with the final fix.
> On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
>
>>
>>
>> Ok. I am able to understand the problem now. Issue is:
>>
>> If i create a column family altercations as:
>>
>>
>> **********************************************************************************************************8
>> CREATE TABLE altercations (
>> instigator text,
>> started_at timestamp,
>> ships_destroyed int,
>> energy_used float,
>> alliance_involvement boolean,
>> PRIMARY KEY (instigator,started_at,ships_destroyed)
>> );
>> /
>> INSERT INTO altercations (instigator, started_at, ships_destroyed,
>> energy_used, alliance_involvement)
>> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6, 'false');
>>
>> *********************************************************************************************************************
>>
>> It works!
>>
>> But if i create a column family with compound primary key with 2 composite
>> column as:
>>
>>
>> *********************************************************************************************************************
>> CREATE TABLE altercations (
>> instigator text,
>> started_at timestamp,
>> ships_destroyed int,
>> energy_used float,
>> alliance_involvement boolean,
>> PRIMARY KEY (instigator,started_at)
>> );
>>
>>
>> *********************************************************************************************************************
>> and Then drop this column family:
>>
>>
>> *********************************************************************************************************************
>> drop columnfamily altercations;
>>
>> *********************************************************************************************************************
>>
>> and then try to create same one with primary compound key with 3 composite
>> column:
>>
>>
>> *********************************************************************************************************************
>>
>> CREATE TABLE altercations (
>> instigator text,
>> started_at timestamp,
>> ships_destroyed int,
>> energy_used float,
>> alliance_involvement boolean,
>> PRIMARY KEY (instigator,started_at,ships_destroyed)
>> );
>>
>> *********************************************************************************************************************
>>
>> it gives me error: "TSocket read 0 bytes"
>>
>> Rest, as no column family is created, so nothing onwards will work.
>>
>> Is this an issue?
>>
>> -Vivek
>>
>>
>> ________________________________
>> From: Jonathan Ellis <jb...@gmail.com>
>> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
>> Sent: Tuesday, October 9, 2012 9:08 AM
>> Subject: Re: Compund/Composite column names
>>
>> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
>>
>> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
>>
>>
>>
>> --
>> Jonathan Ellis
>> Project Chair, Apache Cassandra
>> co-founder of DataStax, the source for professional Cassandra support
>> http://www.datastax.com
--
Brian ONeill
Lead Architect, Health Market Science (http://healthmarketscience.com)
mobile:215.588.6024
blog: http://brianoneill.blogspot.com/
twitter: @boneill42
Re: Compund/Composite column names
Posted by Jonathan Ellis <jb...@gmail.com>.
Sounds like you're running into the keyspace drop bug. It's "mostly" fixed
in 1.1.5 but you might need the latest from 1.1 branch. 1.1.6 will be
released soon with the final fix.
On Oct 9, 2012 1:58 AM, "Vivek Mishra" <vi...@yahoo.com> wrote:
>
>
> Ok. I am able to understand the problem now. Issue is:
>
> If i create a column family altercations as:
>
>
> **********************************************************************************************************8
> CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> );
> /
> INSERT INTO altercations (instigator, started_at, ships_destroyed,
> energy_used, alliance_involvement)
> VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6, 'false');
>
> *********************************************************************************************************************
>
> It works!
>
> But if i create a column family with compound primary key with 2 composite
> column as:
>
>
> *********************************************************************************************************************
> CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at)
> );
>
>
> *********************************************************************************************************************
> and Then drop this column family:
>
>
> *********************************************************************************************************************
> drop columnfamily altercations;
>
> *********************************************************************************************************************
>
> and then try to create same one with primary compound key with 3 composite
> column:
>
>
> *********************************************************************************************************************
>
> CREATE TABLE altercations (
> instigator text,
> started_at timestamp,
> ships_destroyed int,
> energy_used float,
> alliance_involvement boolean,
> PRIMARY KEY (instigator,started_at,ships_destroyed)
> );
>
> *********************************************************************************************************************
>
> it gives me error: "TSocket read 0 bytes"
>
> Rest, as no column family is created, so nothing onwards will work.
>
> Is this an issue?
>
> -Vivek
>
>
> ________________________________
> From: Jonathan Ellis <jb...@gmail.com>
> To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
> Sent: Tuesday, October 9, 2012 9:08 AM
> Subject: Re: Compund/Composite column names
>
> Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
>
> On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
Re: Compund/Composite column names
Posted by Vivek Mishra <vi...@yahoo.com>.
Ok. I am able to understand the problem now. Issue is:
If i create a column family altercations as:
**********************************************************************************************************8
CREATE TABLE altercations (
instigator text,
started_at timestamp,
ships_destroyed int,
energy_used float,
alliance_involvement boolean,
PRIMARY KEY (instigator,started_at,ships_destroyed)
);
/
INSERT INTO altercations (instigator, started_at, ships_destroyed,
energy_used, alliance_involvement)
VALUES ('Jayne Cobb', '2012-07-23', 2, 4.6, 'false');
*********************************************************************************************************************
It works!
But if i create a column family with compound primary key with 2 composite column as:
*********************************************************************************************************************
CREATE TABLE altercations (
instigator text,
started_at timestamp,
ships_destroyed int,
energy_used float,
alliance_involvement boolean,
PRIMARY KEY (instigator,started_at)
);
*********************************************************************************************************************
and Then drop this column family:
*********************************************************************************************************************
drop columnfamily altercations;
*********************************************************************************************************************
and then try to create same one with primary compound key with 3 composite column:
*********************************************************************************************************************
CREATE TABLE altercations (
instigator text,
started_at timestamp,
ships_destroyed int,
energy_used float,
alliance_involvement boolean,
PRIMARY KEY (instigator,started_at,ships_destroyed)
);
*********************************************************************************************************************
it gives me error: "TSocket read 0 bytes"
Rest, as no column family is created, so nothing onwards will work.
Is this an issue?
-Vivek
________________________________
From: Jonathan Ellis <jb...@gmail.com>
To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
Sent: Tuesday, October 9, 2012 9:08 AM
Subject: Re: Compund/Composite column names
Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Compund/Composite column names
Posted by Vivek Mishra <vi...@yahoo.com>.
i tried with 1.1.2
________________________________
From: Jonathan Ellis <jb...@gmail.com>
To: dev@cassandra.apache.org; Vivek Mishra <vi...@yahoo.com>
Sent: Tuesday, October 9, 2012 9:08 AM
Subject: Re: Compund/Composite column names
Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Compund/Composite column names
Posted by Jonathan Ellis <jb...@gmail.com>.
Works for me on latest 1.1 in cql3 mode. cql2 mode gives a parse error.
On Mon, Oct 8, 2012 at 9:18 PM, Vivek Mishra <vi...@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
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Compund/Composite column names
Posted by Vivek Mishra <vi...@yahoo.com>.
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
Re: Pushing Cassandra 1.2 back a month to November?
Posted by paul cannon <pc...@gmail.com>.
On Tue, Sep 25, 2012 at 11:16 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> 2) The binary protocol only really has a Java implementation so far.
> Having the time to flesh out the Python implementation would be a good
> sanity check before we commit to protocol stability.
>
Just to clarify, the Python implementation is complete(*) as far as I know,
but lacks any significant real-world use or heavy test coverage.
(*) just finished adding the snappy compression and event registration
support and added some basic tests last night, and committed it to the
master branch today.
p