Re: problem with running simple example using cassandra-cli with 0.6.0-beta2
Thanks. With 0.6.0-beta2 using Standard2 does show a human-readable column. However, the behavior is definitely different between 0.5.1 and 0.6.0-beta2. I am using the binary distribution of 0.5.1: cassandra show version 0.5.1 cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=last, value=Smith, timestamp=1268408466548) = (column=first, value=John, timestamp=1268408464036) = (column=age, value=42, timestamp=1268408468895) Returned 3 results. With 0.5.1 using Standard1 does show a human-readable column as documented in the Wiki. Not sure which one is the correct behavior here. Bill On Thu, Mar 11, 2010 at 1:22 PM, Eric Evans eev...@rackspace.com wrote: On Wed, 2010-03-10 at 18:09 -0500, Bill Au wrote: I am checking out 0.6.0-beta2 since I need the batch-mutate function. I am just trying to run the example is the cassandra-cli Wiki: http://wiki.apache.org/cassandra/CassandraCli Here is what I am getting: cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6669727374, value=John, timestamp=1268261785077) Returned 1 results. The column name being returned by get (6669727374) does not match what is set (first). This is true for all column names. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6c617374, value=Smith, timestamp=1268262480130) = (column=6669727374, value=John, timestamp=1268261785077) = (column=616765, value=42, timestamp=1268262484133) Returned 3 results. Is this a problem in 0.6.0-beta2 or am I doing anything wrong? No, you're not doing anything wrong. What you're seeing is the hex representation of a BytesType, which is the comparator that Standard1 in the example config uses. This is the same for 0.5.1 too. If you haven't made any changes to the default config, try using Standard2 as the column family and you'll see a human-readable column name as expected (Standard2 uses a UTF8Type comparator). The wiki page has sample output that is confusing, (it's probably cut-and-paste from a time when Standard1 used an ASCII or UTF8 comparator), we should probably fix that. -- Eric Evans eev...@rackspace.com
Re: problem with running simple example using cassandra-cli with 0.6.0-beta2
On Fri, 2010-03-12 at 11:21 -0500, Bill Au wrote: Thanks. With 0.6.0-beta2 using Standard2 does show a human-readable column. However, the behavior is definitely different between 0.5.1 and 0.6.0-beta2. I am using the binary distribution of 0.5.1: cassandra show version 0.5.1 cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=last, value=Smith, timestamp=1268408466548) = (column=first, value=John, timestamp=1268408464036) = (column=age, value=42, timestamp=1268408468895) Returned 3 results. With 0.5.1 using Standard1 does show a human-readable column as documented in the Wiki. Right you are, my mistake. This changed in https://issues.apache.org/jira/browse/CASSANDRA-661 (which occurred between 0.5 and 0.6). Not sure which one is the correct behavior here. The current behavior is correct. I'll update the examples to avoid future confusion. -- Eric Evans eev...@rackspace.com
Re: problem with running simple example using cassandra-cli with 0.6.0-beta2
Thanks for clearing this up for me. Bill On Fri, Mar 12, 2010 at 11:49 AM, Eric Evans eev...@rackspace.com wrote: On Fri, 2010-03-12 at 11:21 -0500, Bill Au wrote: Thanks. With 0.6.0-beta2 using Standard2 does show a human-readable column. However, the behavior is definitely different between 0.5.1 and 0.6.0-beta2. I am using the binary distribution of 0.5.1: cassandra show version 0.5.1 cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=last, value=Smith, timestamp=1268408466548) = (column=first, value=John, timestamp=1268408464036) = (column=age, value=42, timestamp=1268408468895) Returned 3 results. With 0.5.1 using Standard1 does show a human-readable column as documented in the Wiki. Right you are, my mistake. This changed in https://issues.apache.org/jira/browse/CASSANDRA-661 (which occurred between 0.5 and 0.6). Not sure which one is the correct behavior here. The current behavior is correct. I'll update the examples to avoid future confusion. -- Eric Evans eev...@rackspace.com
Re: problem with running simple example using cassandra-cli with 0.6.0-beta2
Yes, I was expecting the column names to come back as strings like the way it does with 0.5.1. Bill On Thu, Mar 11, 2010 at 12:03 AM, Jonathan Ellis jbel...@gmail.com wrote: I think he means how the column names are rendered as bytes but the values are strings. On Wed, Mar 10, 2010 at 5:22 PM, Brandon Williams dri...@gmail.com wrote: On Wed, Mar 10, 2010 at 5:09 PM, Bill Au bill.w...@gmail.com wrote: I am checking out 0.6.0-beta2 since I need the batch-mutate function. I am just trying to run the example is the cassandra-cli Wiki: http://wiki.apache.org/cassandra/CassandraCli Here is what I am getting: cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6669727374, value=John, timestamp=1268261785077) Returned 1 results. The column name being returned by get (6669727374) does not match what is set (first). This is true for all column names. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6c617374, value=Smith, timestamp=1268262480130) = (column=6669727374, value=John, timestamp=1268261785077) = (column=616765, value=42, timestamp=1268262484133) Returned 3 results. Is this a problem in 0.6.0-beta2 or am I doing anything wrong? Bill This is normal. You've added the 'first', 'last', and 'age' columns to the 'jsmith' row, and then asked for the entire row, so you got all 3 columns back. -Brandon
problem with running simple example using cassandra-cli with 0.6.0-beta2
I am checking out 0.6.0-beta2 since I need the batch-mutate function. I am just trying to run the example is the cassandra-cli Wiki: http://wiki.apache.org/cassandra/CassandraCli Here is what I am getting: cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6669727374, value=John, timestamp=1268261785077) Returned 1 results. The column name being returned by get (6669727374) does not match what is set (first). This is true for all column names. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6c617374, value=Smith, timestamp=1268262480130) = (column=6669727374, value=John, timestamp=1268261785077) = (column=616765, value=42, timestamp=1268262484133) Returned 3 results. Is this a problem in 0.6.0-beta2 or am I doing anything wrong? Bill
Re: problem with running simple example using cassandra-cli with 0.6.0-beta2
On Wed, Mar 10, 2010 at 5:09 PM, Bill Au bill.w...@gmail.com wrote: I am checking out 0.6.0-beta2 since I need the batch-mutate function. I am just trying to run the example is the cassandra-cli Wiki: http://wiki.apache.org/cassandra/CassandraCli Here is what I am getting: cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6669727374, value=John, timestamp=1268261785077) Returned 1 results. The column name being returned by get (6669727374) does not match what is set (first). This is true for all column names. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6c617374, value=Smith, timestamp=1268262480130) = (column=6669727374, value=John, timestamp=1268261785077) = (column=616765, value=42, timestamp=1268262484133) Returned 3 results. Is this a problem in 0.6.0-beta2 or am I doing anything wrong? Bill This is normal. You've added the 'first', 'last', and 'age' columns to the 'jsmith' row, and then asked for the entire row, so you got all 3 columns back. -Brandon
Re: problem with running simple example using cassandra-cli with 0.6.0-beta2
I think he means how the column names are rendered as bytes but the values are strings. On Wed, Mar 10, 2010 at 5:22 PM, Brandon Williams dri...@gmail.com wrote: On Wed, Mar 10, 2010 at 5:09 PM, Bill Au bill.w...@gmail.com wrote: I am checking out 0.6.0-beta2 since I need the batch-mutate function. I am just trying to run the example is the cassandra-cli Wiki: http://wiki.apache.org/cassandra/CassandraCli Here is what I am getting: cassandra set Keyspace1.Standard1['jsmith']['first'] = 'John' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6669727374, value=John, timestamp=1268261785077) Returned 1 results. The column name being returned by get (6669727374) does not match what is set (first). This is true for all column names. cassandra set Keyspace1.Standard1['jsmith']['last'] = 'Smith' Value inserted. cassandra set Keyspace1.Standard1['jsmith']['age'] = '42' Value inserted. cassandra get Keyspace1.Standard1['jsmith'] = (column=6c617374, value=Smith, timestamp=1268262480130) = (column=6669727374, value=John, timestamp=1268261785077) = (column=616765, value=42, timestamp=1268262484133) Returned 3 results. Is this a problem in 0.6.0-beta2 or am I doing anything wrong? Bill This is normal. You've added the 'first', 'last', and 'age' columns to the 'jsmith' row, and then asked for the entire row, so you got all 3 columns back. -Brandon