dht: Make partitioner work on partition_key_view
This commit is contained in:
@@ -136,7 +136,7 @@ public:
|
||||
* (This is NOT a method to create a token from its string representation;
|
||||
* for that, use tokenFactory.fromString.)
|
||||
*/
|
||||
virtual token get_token(const schema& s, const partition_key& key) = 0;
|
||||
virtual token get_token(const schema& s, partition_key_view key) = 0;
|
||||
virtual token get_token(const sstables::key_view& key) = 0;
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ murmur3_partitioner::get_token(const sstables::key_view& key) {
|
||||
}
|
||||
|
||||
token
|
||||
murmur3_partitioner::get_token(const schema& s, const partition_key& key) {
|
||||
murmur3_partitioner::get_token(const schema& s, partition_key_view key) {
|
||||
std::array<uint64_t, 2> hash;
|
||||
auto&& legacy = key.legacy_form(s);
|
||||
utils::murmur_hash::hash3_x64_128(legacy.begin(), legacy.size(), 0, hash);
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace dht {
|
||||
|
||||
class murmur3_partitioner final : public i_partitioner {
|
||||
public:
|
||||
virtual token get_token(const schema& s, const partition_key& key);
|
||||
virtual token get_token(const schema& s, partition_key_view key);
|
||||
virtual token get_token(const sstables::key_view& key);
|
||||
virtual bool preserves_order() override { return false; }
|
||||
virtual std::map<token, float> describe_ownership(const std::vector<token>& sorted_tokens);
|
||||
|
||||
Reference in New Issue
Block a user