]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/table/mock_table.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / rocksdb / table / mock_table.cc
index 65a43616969fbbd70505edb01f49cf7e41bbcc8d..9ef44628a75f1800b76d31505883fb70c4cf9f34 100644 (file)
@@ -6,13 +6,14 @@
 #include "table/mock_table.h"
 
 #include "db/dbformat.h"
+#include "env/composite_env_wrapper.h"
+#include "file/random_access_file_reader.h"
 #include "port/port.h"
 #include "rocksdb/table_properties.h"
 #include "table/get_context.h"
 #include "util/coding.h"
-#include "util/file_reader_writer.h"
 
-namespace rocksdb {
+namespace ROCKSDB_NAMESPACE {
 namespace mock {
 
 namespace {
@@ -28,7 +29,8 @@ stl_wrappers::KVMap MakeMockFile(
 
 InternalIterator* MockTableReader::NewIterator(
     const ReadOptions&, const SliceTransform* /* prefix_extractor */,
-    Arena* /*arena*/, bool /*skip_filters*/, bool /*for_compaction*/) {
+    Arena* /*arena*/, bool /*skip_filters*/, TableReaderCaller /*caller*/,
+    size_t /*compaction_readahead_size*/) {
   return new MockTableIterator(table_);
 }
 
@@ -93,7 +95,8 @@ Status MockTableFactory::CreateMockTable(Env* env, const std::string& fname,
     return s;
   }
 
-  WritableFileWriter file_writer(std::move(file), fname, EnvOptions());
+  WritableFileWriter file_writer(NewLegacyWritableFileWrapper(std::move(file)),
+                                 fname, EnvOptions());
 
   uint32_t id = GetAndWriteNextID(&file_writer);
   file_system_.files.insert({id, std::move(file_contents)});
@@ -142,4 +145,4 @@ void MockTableFactory::AssertLatestFile(
 }
 
 }  // namespace mock
-}  // namespace rocksdb
+}  // namespace ROCKSDB_NAMESPACE