[
https://issues.apache.org/jira/browse/CASSANDRA-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13011356#comment-13011356
]
Sylvain Lebresne commented on CASSANDRA-2321:
---------------------------------------------
bq. I'm not sure this refactor is much of an improvement. Seems like the code
moves around a lot but volume and complexity are not really reduced.
I do believe the refactor is an improvement (granted, maybe not a huge one).
During validation we do a bunch of queries to DatabaseDescriptor to check the
cf exists, then to get its type (super or standard), then to get its value
validator, etc... Granted those are just hashMaps gets, but they are just
unnecessary. I do think that the method used by the refactor, that is getting
the metadata once and giving it to all other method is cleaner. There also the
fact that we revalidate the column family for each Mutation of a batch_mutate,
even if all of them are on the same cf, which this refactor fixes too.
I don't care so much about those and won't fight over it, but I think it would
be a pity to leave ThriftValidation in that state (and the refactoring is
really trivial). Note that I'll be perfectly ok with moving the refactor in
another ticket if that makes it better.
bq. Can't we just add a "validateCounterCF" to counter calls and
"validateNonCounterCF" otherwise?
Yes we could, up to the fact that the refactor would still make sense I think
for the reason above :)
bq. (I'd prefer to say "counter/noncounter" vs "noncommutative/commutative" but
if you really prefer the other that's okay too.)
When I have a few free cycles I plan to remove the 'commutative' wording
completely as I think this was premature generalization and make the code less
readable right now. So I'm on your side, I just went for consistency with the
rest of the code for now.
> Counter column values shows in hex values. Need to show it in string value.
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-2321
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2321
> 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 stress.py 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',
> ttl=None))]
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira