You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Joe Alex <jo...@gmail.com> on 2010/10/26 23:42:39 UTC
Why is column name not printed for Keyspace1.Standard1
With the sample Keyspace1 can somebody explain why the column names
does not print in the Standard2 case, is it because of UTF8Type?
<Keyspace Name="Keyspace1">
<ColumnFamily Name="Standard1" CompareWith="BytesType"
KeysCached="1000"
RowsCached="100"
RowCacheSavePeriodInSeconds="0"
KeyCacheSavePeriodInSeconds="3600"/>
<ColumnFamily Name="Standard2"
CompareWith="UTF8Type"
KeysCached="100%"/>
cassandra> set Keyspace1.Standard1['100']['first'] = 'John'
Value inserted.
cassandra> set Keyspace1.Standard1['100']['last'] = 'Doe'
Value inserted.
cassandra> set Keyspace1.Standard1['100']['middle'] = 'M'
Value inserted.
cassandra> get Keyspace1.Standard1['100']
=> (column=6d6964646c65, value=M, timestamp=1288128322609000)
=> (column=6c617374, value=Doe, timestamp=1288128312046000)
=> (column=6669727374, value=John, timestamp=1288128300504000)
Returned 3 results.
cassandra> set Keyspace1.Standard2['100']['first'] = 'John'
Value inserted.
cassandra> set Keyspace1.Standard2['100']['last'] = 'Doe'
Value inserted.
cassandra> set Keyspace1.Standard2['100']['middle'] = 'M'
Value inserted.
cassandra> get Keyspace1.Standard2['100']
=> (column=middle, value=M, timestamp=1288128381467000)
=> (column=last, value=Doe, timestamp=1288128369639000)
=> (column=first, value=John, timestamp=1288128358062000)
Returned 3 results.
cassandra>
Re: Why is column name not printed for Keyspace1.Standard1
Posted by deni lugito <de...@gmail.com>.
unssubscribe
Re: Why is column name not printed for Keyspace1.Standard1
Posted by Joe Alex <jo...@gmail.com>.
That is neat. Will switch to .7 as soon as it is out.
On Tue, Oct 26, 2010 at 7:15 PM, Jonathan Ellis <jb...@gmail.com> wrote:
> In 0.7rc1 you can do
>
> get Keyspace1.Standard1['100'] as utf8
>
> if you know that a column defined as bytes has a certain type of data.
>
> On Tue, Oct 26, 2010 at 4:50 PM, Daniel Lundin <dl...@eintr.org> wrote:
>> Since CompareWith is BytesType, the cli will print the names as (hex) bytes.
>>
>> Example: "6d6964646c65" => "\x6d\x69\x64\x64\x6c\x65" => "middle"
>>
>> /d
>>
>> On Tue, Oct 26, 2010 at 11:42 PM, Joe Alex <jo...@gmail.com> wrote:
>>> With the sample Keyspace1 can somebody explain why the column names
>>> does not print in the Standard2 case, is it because of UTF8Type?
>>> *SNIP*
>>> cassandra> get Keyspace1.Standard1['100']
>>> => (column=6d6964646c65, value=M, timestamp=1288128322609000)
>>> => (column=6c617374, value=Doe, timestamp=1288128312046000)
>>> => (column=6669727374, value=John, timestamp=1288128300504000)
>>> Returned 3 results.
>>
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of Riptano, the source for professional Cassandra support
> http://riptano.com
>
Re: Why is column name not printed for Keyspace1.Standard1
Posted by Jonathan Ellis <jb...@gmail.com>.
In 0.7rc1 you can do
get Keyspace1.Standard1['100'] as utf8
if you know that a column defined as bytes has a certain type of data.
On Tue, Oct 26, 2010 at 4:50 PM, Daniel Lundin <dl...@eintr.org> wrote:
> Since CompareWith is BytesType, the cli will print the names as (hex) bytes.
>
> Example: "6d6964646c65" => "\x6d\x69\x64\x64\x6c\x65" => "middle"
>
> /d
>
> On Tue, Oct 26, 2010 at 11:42 PM, Joe Alex <jo...@gmail.com> wrote:
>> With the sample Keyspace1 can somebody explain why the column names
>> does not print in the Standard2 case, is it because of UTF8Type?
>> *SNIP*
>> cassandra> get Keyspace1.Standard1['100']
>> => (column=6d6964646c65, value=M, timestamp=1288128322609000)
>> => (column=6c617374, value=Doe, timestamp=1288128312046000)
>> => (column=6669727374, value=John, timestamp=1288128300504000)
>> Returned 3 results.
>
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com
Re: Why is column name not printed for Keyspace1.Standard1
Posted by Daniel Lundin <dl...@eintr.org>.
Since CompareWith is BytesType, the cli will print the names as (hex) bytes.
Example: "6d6964646c65" => "\x6d\x69\x64\x64\x6c\x65" => "middle"
/d
On Tue, Oct 26, 2010 at 11:42 PM, Joe Alex <jo...@gmail.com> wrote:
> With the sample Keyspace1 can somebody explain why the column names
> does not print in the Standard2 case, is it because of UTF8Type?
> *SNIP*
> cassandra> get Keyspace1.Standard1['100']
> => (column=6d6964646c65, value=M, timestamp=1288128322609000)
> => (column=6c617374, value=Doe, timestamp=1288128312046000)
> => (column=6669727374, value=John, timestamp=1288128300504000)
> Returned 3 results.