From 6259dd73b678ee4dd0ef73192eae98aa0d0aef2c Mon Sep 17 00:00:00 2001 From: Asias He Date: Thu, 29 Oct 2015 18:21:01 +0800 Subject: [PATCH] token: Print token using the partitioner defined method Make nodetool ring output align with c* output. --- dht/i_partitioner.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dht/i_partitioner.cc b/dht/i_partitioner.cc index 97b864c6eb..02722e56a6 100644 --- a/dht/i_partitioner.cc +++ b/dht/i_partitioner.cc @@ -161,12 +161,7 @@ std::ostream& operator<<(std::ostream& out, const token& t) { } else if (t._kind == token::kind::before_all_keys) { out << "minimum token"; } else { - auto flags = out.flags(); - for (auto c : t._data) { - unsigned char x = c; - out << std::hex << std::setw(2) << std::setfill('0') << +x << " "; - } - out.flags(flags); + out << global_partitioner().to_sstring(t); } return out; }