]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/include/rocksdb/sst_file_reader.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
10 #include "rocksdb/iterator.h"
11 #include "rocksdb/options.h"
12 #include "rocksdb/slice.h"
13 #include "rocksdb/table_properties.h"
15 namespace ROCKSDB_NAMESPACE
{
17 // SstFileReader is used to read sst files that are generated by DB or
21 SstFileReader(const Options
& options
);
25 // Prepares to read from the file located at "file_path".
26 Status
Open(const std::string
& file_path
);
28 // Returns a new iterator over the table contents.
29 // Most read options provide the same control as we read from DB.
30 // If "snapshot" is nullptr, the iterator returns only the latest keys.
31 Iterator
* NewIterator(const ReadOptions
& options
);
33 std::shared_ptr
<const TableProperties
> GetTableProperties() const;
35 // Verifies whether there is corruption in this table.
36 Status
VerifyChecksum(const ReadOptions
& /*read_options*/);
38 Status
VerifyChecksum() { return VerifyChecksum(ReadOptions()); }
42 std::unique_ptr
<Rep
> rep_
;
45 } // namespace ROCKSDB_NAMESPACE
47 #endif // !ROCKSDB_LITE