From 34d099dfbf29f2f37ade7524a2534a2bbbc152cd Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Tue, 28 Apr 2015 17:29:25 -0400 Subject: [PATCH] sstables: make read_summary_entry private Signed-off-by: Glauber Costa --- sstables/sstables.hh | 4 ++-- tests/urchin/sstable_test.cc | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sstables/sstables.hh b/sstables/sstables.hh index c0202fd34058..3ea0eb707a05 100644 --- a/sstables/sstables.hh +++ b/sstables/sstables.hh @@ -121,6 +121,8 @@ private: template int binary_search(const T& entries, const key& sk); + + future read_summary_entry(size_t i); public: // Read one or few rows at the given byte range from the data file, // feeding them into the consumer. This function reads the entire given @@ -153,8 +155,6 @@ public: future<> load(); future<> store(); - future read_summary_entry(size_t i); - void set_generation(unsigned long generation) { _generation = generation; } // Allow the test cases from sstable_test.cc to test private methods. We use diff --git a/tests/urchin/sstable_test.cc b/tests/urchin/sstable_test.cc index fa5cdb385f0e..e122f3d2c001 100644 --- a/tests/urchin/sstable_test.cc +++ b/tests/urchin/sstable_test.cc @@ -58,6 +58,10 @@ class test { return _sst->read_summary(); } + future read_summary_entry(size_t i) { + return _sst->read_summary_entry(i); + } + summary& get_summary() { return _sst->_summary; } @@ -207,7 +211,7 @@ SEASTAR_TEST_CASE(composite_index_read_0_21_20) { template future<> summary_query(sstring path, int generation) { return reusable_sst(path, generation).then([] (sstable_ptr ptr) { - return ptr->read_summary_entry(Position).then([ptr] (auto entry) { + return sstables::test(ptr).read_summary_entry(Position).then([ptr] (auto entry) { BOOST_REQUIRE(entry.position == EntryPosition); BOOST_REQUIRE(entry.key.size() == EntryKeySize); return make_ready_future<>();