diff --git a/database.cc b/database.cc index b2e226f978..11ba21eebf 100644 --- a/database.cc +++ b/database.cc @@ -1471,6 +1471,18 @@ database::query_mutations(const query::read_command& cmd, const query::partition } } +std::unordered_set database::get_initial_tokens() { + std::unordered_set tokens; + sstring tokens_string = get_config().initial_token(); + try { + boost::split(tokens, tokens_string, boost::is_any_of(sstring(","))); + } catch (...) { + throw std::runtime_error(sprint("Unable to parse initial_token=%s", tokens_string)); + } + tokens.erase(""); + return tokens; +} + std::ostream& operator<<(std::ostream& out, const atomic_cell_or_collection& c) { return out << to_hex(c._data); } diff --git a/database.hh b/database.hh index 711f6d8de8..8c351f559d 100644 --- a/database.hh +++ b/database.hh @@ -633,6 +633,8 @@ public: const logalloc::region_group& dirty_memory_region_group() const { return _dirty_memory_region_group; } + + std::unordered_set get_initial_tokens(); }; // FIXME: stub