Created
June 20, 2012 10:51
-
-
Save nmmmnu/2959336 to your computer and use it in GitHub Desktop.
cassandra possible IntegerType bug?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in CLI: | |
create column family a | |
with column_type = 'Standard' and | |
comparator = 'IntegerType' and | |
default_validation_class = 'UTF8Type' and | |
key_validation_class = 'IntegerType'; | |
======================= | |
PHP: | |
$cf = new ColumnFamily($pool, 'a'); | |
// problem? | |
$cf->insert(-32984, array(0, 'test')); | |
$cf->insert(0, array(-32984, 'test')); | |
$cf->insert(-329841, array(1, 'test')); | |
$cf->insert(1, array(-329841, 'test')); | |
======================= | |
back in CLI: | |
>>> list a; | |
Using default limit of 100 | |
------------------- | |
RowKey: 8388392 << WTF?!?!? | |
=> (column=0, value=0, timestamp=1340189779932723) | |
=> (column=1, value=test, timestamp=1340189779932723) | |
------------------- | |
RowKey: 1 | |
=> (column=0, value=-329841, timestamp=1340189779937252) | |
=> (column=1, value=test, timestamp=1340189779937252) | |
------------------- | |
RowKey: 0 | |
=> (column=0, value=-32984, timestamp=1340189779935107) | |
=> (column=1, value=test, timestamp=1340189779935107) | |
------------------- | |
RowKey: -329841 | |
=> (column=0, value=1, timestamp=1340189779936292) | |
=> (column=1, value=test, timestamp=1340189779936292) | |
4 Rows Returned. | |
Elapsed time: 36 msec(s). | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment