From 93579287da929a89b5a5dc7ff773b8d199cb29bf Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 6 Sep 2015 14:30:30 +0300 Subject: [PATCH] sstables: add sstable::toc_filename() Useful for when we want to later access an sstable without instantiating the heavyweight sstable class. --- sstables/sstables.cc | 4 ++++ sstables/sstables.hh | 1 + 2 files changed, 5 insertions(+) diff --git a/sstables/sstables.cc b/sstables/sstables.cc index e8bf0323a6..e4e2cc7059 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -1352,6 +1352,10 @@ const sstring sstable::filename(component_type f) const { return filename(_dir, _ks, _cf, _version, _generation, _format, f); } +sstring sstable::toc_filename() const { + return filename(component_type::TOC); +} + const sstring sstable::temporary_filename(component_type f) { return filename(_dir, _ks, _cf, _version, _generation, _format, f, true); } diff --git a/sstables/sstables.hh b/sstables/sstables.hh index c263a57e66..252a47d3dd 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -238,6 +238,7 @@ public: const sstring get_filename() { return filename(component_type::Data); } + sstring toc_filename() const; metadata_collector& get_metadata_collector() { return _collector;