diff --git a/sstables/sstables.cc b/sstables/sstables.cc index b58f5ab246..9589a69784 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -1389,6 +1389,10 @@ sstable::format_types sstable::format_from_sstring(sstring &s) { return reverse_map(s, _format_string); } +sstable::component_type sstable::component_from_sstring(sstring &s) { + return reverse_map(s, _component_map); +} + input_stream sstable::data_stream_at(uint64_t pos) { if (_compression) { return make_compressed_file_input_stream( diff --git a/sstables/sstables.hh b/sstables/sstables.hh index 4555c43746..985835ce71 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -161,6 +161,7 @@ public: // Like data_consume_rows() with bounds, but iterates over whole range data_consume_context data_consume_rows(row_consumer& consumer); + static component_type component_from_sstring(sstring& s); static version_types version_from_sstring(sstring& s); static format_types format_from_sstring(sstring& s); static const sstring filename(sstring dir, version_types version, unsigned long generation,