cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] Updated: (CASSANDRA-2321) Counter column values shows in hex values. Need to show it in string value.
Date Tue, 15 Mar 2011 16:09:29 GMT


Sylvain Lebresne updated CASSANDRA-2321:

    Attachment: 0001-Don-t-allow-normal-query-on-counter-CF.patch

Actually, having getString() return hexString is the right thing to do, because internally
counters are bytes and getString is used by sstable2json in particular.

The problem however is that it is not disallowed to query a counter CF with non-counter operation.
Attaching a patch to correct this. This is a bigger patch that one would hope because ThriftValidation
doesn't help. So the patch does a bunch of refactoring to allow what it must do. As a side
node, the refactoring makes it more efficient (We don't revalidate the column family for each
mutation of a batch_mutate).

Btw, has no support for counters, but has it. 

> Counter column values shows in hex values. Need to show it in string value.
> ---------------------------------------------------------------------------
>                 Key: CASSANDRA-2321
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8
>         Environment: Linux
>            Reporter: Mubarak Seyed
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>         Attachments: 0001-Don-t-allow-normal-query-on-counter-CF.patch
> CounterColumnType.getString() returns hexString.
> {code}
> public String getString(ByteBuffer bytes)
> { 
>        return ByteBufferUtil.bytesToHex(bytes);
> }
> {code}
> and python reader returns
> [ColumnOrSuperColumn(column=None, super_column=SuperColumn(name='19', columns=[Column(timestamp=1299984960277,
name='56', value='\x7f\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00,',
ttl=None), Column(timestamp=1299985019923, name='57', value='\x7f\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00;\x00\x00\x00\x00\x00\x00\x08\xfd',

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message