You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Yang <te...@gmail.com> on 2011/05/24 18:15:00 UTC

issue/minor bug with counters ?

if you have only counter columns in your keyspace, and do a lot of
updates on a few keys,
the getLiveSize() of memtable actually returns the total amount of
traffic that has gone into the Memtable,
not the real size,
so you end up producing very small SStables, with only a few KBytes.
(I have already changed the CF.memtable_throughput memtable_operations
memtable_flush_after params )



this can be changed easily by modifying the CounterColumn.resolve() so
that it updates the
currentThroughput with the ***difference ****  of old column size and
new column size, not just the size of new column.

Re: issue/minor bug with counters ?

Posted by Yang <te...@gmail.com>.
then I guess Memtable.getLiveSize() should not rely on the
currentThroughput for size calculation,
an extra var currentSize is needed during the bookkeeping of resolve()


On Tue, May 24, 2011 at 9:47 AM, Jonathan Ellis <jb...@gmail.com> wrote:
> "the total amount of traffic that has gone into the Memtable" is how
> throughput is defined, so this is working as expected.
>
> On Tue, May 24, 2011 at 11:15 AM, Yang <te...@gmail.com> wrote:
>> if you have only counter columns in your keyspace, and do a lot of
>> updates on a few keys,
>> the getLiveSize() of memtable actually returns the total amount of
>> traffic that has gone into the Memtable,
>> not the real size,
>> so you end up producing very small SStables, with only a few KBytes.
>> (I have already changed the CF.memtable_throughput memtable_operations
>> memtable_flush_after params )
>>
>>
>>
>> this can be changed easily by modifying the CounterColumn.resolve() so
>> that it updates the
>> currentThroughput with the ***difference ****  of old column size and
>> new column size, not just the size of new column.
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com
>

Re: issue/minor bug with counters ?

Posted by Jonathan Ellis <jb...@gmail.com>.
"the total amount of traffic that has gone into the Memtable" is how
throughput is defined, so this is working as expected.

On Tue, May 24, 2011 at 11:15 AM, Yang <te...@gmail.com> wrote:
> if you have only counter columns in your keyspace, and do a lot of
> updates on a few keys,
> the getLiveSize() of memtable actually returns the total amount of
> traffic that has gone into the Memtable,
> not the real size,
> so you end up producing very small SStables, with only a few KBytes.
> (I have already changed the CF.memtable_throughput memtable_operations
> memtable_flush_after params )
>
>
>
> this can be changed easily by modifying the CounterColumn.resolve() so
> that it updates the
> currentThroughput with the ***difference ****  of old column size and
> new column size, not just the size of new column.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com