gpt4 book ai didi

cassandra - 在 Cassandra 中获取具有公共(public)前缀的键范围

转载 作者:行者123 更新时间:2023-12-02 15:03:12 25 4
gpt4 key购买 nike

我想使用 hector API 获取具有公共(public)前缀的所有行。我玩了一下 RangeSuperSlicesQuery 但没有找到让它正常工作的方法。关键范围参数是否可以与通配符等一起使用?

更新:我使用 ByteOrderedPartitioner 而不是 RandomPartitioner,它工作得很好。这是预期的行为吗?

最佳答案

是的,这是预期的行为。在 RandomPartitioner 中,行按照其键的 MD5 哈希顺序存储,因此要获得有意义的键范围,您需要使用像 ByteOrderedPartitioner 这样的保序分区器。

但是,使用 ByteOrderedPartitioner or OrderPreservingPartitioner 也有缺点。通常可以使用稍微不同的数据模型和 RandomPartitioner 来避免这种情况。

关于cassandra - 在 Cassandra 中获取具有公共(public)前缀的键范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6292734/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com