diff --git a/dht/i_partitioner.cc b/dht/i_partitioner.cc index ee9f913b22..6a313ab145 100644 --- a/dht/i_partitioner.cc +++ b/dht/i_partitioner.cc @@ -158,6 +158,10 @@ std::ostream& operator<<(std::ostream& out, const token& t) { return out; } +std::ostream& operator<<(std::ostream& out, const decorated_key& dk) { + return out << "{key: " << dk._key << ", token:" << dk._token << "}"; +} + // FIXME: get from global config // FIXME: make it per-keyspace murmur3_partitioner default_partitioner; diff --git a/dht/i_partitioner.hh b/dht/i_partitioner.hh index d3f1a1753a..ea61ab06c7 100644 --- a/dht/i_partitioner.hh +++ b/dht/i_partitioner.hh @@ -170,6 +170,8 @@ bool operator!=(const decorated_key& lht, const decorated_key& rht); std::ostream& operator<<(std::ostream& out, const token& t); +std::ostream& operator<<(std::ostream& out, const decorated_key& t); + i_partitioner& global_partitioner(); } // dht