我在 cassandra 中看到了以下几个值(意识到,我故意放入各种东西以查看会发生什么)。注意:所有 8 字节值都是长整数,其他几个是一些字符串。排序顺序似乎适用于正长,甚至适用于 UTF8 字符串。然而,负多头在列表的最后!!!!
RowKey: 6d796f6e655f696e646578
=> (column=000000000000000a, value=, timestamp=1343228055671000)
=> (column=0000000000000014, value=, timestamp=1343228055671000)
=> (column=0000000000000028, value=, timestamp=1343228055671000)
=> (column=000000000000003c, value=, timestamp=1343228055671000)
=> (column=00000000000000c8, value=, timestamp=1343228055671000)
=> (column=0000000000000154, value=, timestamp=1343228055671000)
=> (column=00000000000001f4, value=, timestamp=1343228055671000)
=> (column=0000000000000226, value=, timestamp=1343228055671000)
=> (column=00000000000002bc, value=, timestamp=1343228055671000)
=> (column=000000746bb814ee, value=, timestamp=1343228055671000)
=> (column=30303030303030303030, value=, timestamp=1343228055671000)
=> (column=61, value=, timestamp=1343228055671000)
=> (column=617364667364, value=, timestamp=1343228055671000)
=> (column=6565656565, value=, timestamp=1343228055671000)
=> (column=657772776572657772657772, value=, timestamp=1343228055671000)
=> (column=fffffffffffffe0c, value=, timestamp=1343228055671000)
=> (column=ffffffffffffff38, value=, timestamp=1343228055671000)
=> (column=ffffffffffffffd8, value=, timestamp=1343228055671000)
现在,如果我告诉 cassandra 假设输入 long 类型,同一行会像这样缺少一堆列(我真的不知道为什么 cassandra 删除了负列????)...
RowKey: 6d796f6e655f696e646578
=> (column=10, value=, timestamp=1343228055671000)
=> (column=20, value=, timestamp=1343228055671000)
=> (column=40, value=, timestamp=1343228055671000)
=> (column=60, value=, timestamp=1343228055671000)
=> (column=200, value=, timestamp=1343228055671000)
=> (column=340, value=, timestamp=1343228055671000)
=> (column=500, value=, timestamp=1343228055671000)
=> (column=550, value=, timestamp=1343228055671000)
=> (column=700, value=, timestamp=1343228055671000)
=> (column=500023432430, value=, timestamp=1343228055671000)
两个问题:
为什么现在缺少负多头(我看到的所有其他多头都正确翻译回来)?
我知道如果只有 8 个字节,你真的需要存储 2 的补码,所以排序顺序“会”出错,那么人们通常如何处理 -50 到 +50 的列切片呢?他们是在做两片,一片在开始,一片在结尾?
谢谢,院长