dht: Make partitioner work on partition_key_view

This commit is contained in:
Tomasz Grabiec
2015-05-06 09:45:52 +02:00
parent 0deec287d4
commit 96bbac8a57
3 changed files with 3 additions and 3 deletions

View File

@@ -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;
/**

View File

@@ -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);

View File

@@ -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);