Go to file
Yu Zhang 74d419be4d Add support in SstFileReader to get a raw table iterator (#12385)
Summary:
This PR adds support to programmatically iterate a raw table file with an iterator returned by `SstFileReader::NewTableIterator`. For third party tools to use to observe SST files created by RocksDB.

The original feature request was from this merge request: https://github.com/facebook/rocksdb/pull/12370

Since keys returned by raw table iterators are internal keys, this PR also adds a struct `ParsedEntryInfo` and util method `ParseEntry` to support user to parse internal key. `GetInternalKeyForSeek`, and `GetInternalKeyForSeekForPrev` to support users to create internal keys for seek operations with this raw table iterator.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12385

Test Plan: Added unit tests

Reviewed By: cbi42

Differential Revision: D55662855

Pulled By: jowlyzhang

fbshipit-source-id: 0716a173ee95924fbd4e1f9b6cccf06525c40049
2024-04-02 21:23:06 -07:00
.circleci
.github
buckifier
build_tools
cache Remove extra semi colon from icsp/lib/logging/IcspLogRpcMessage.cpp 2024-03-31 10:26:34 -07:00
cmake
coverage
db Limit compaction input files expansion (#12484) 2024-03-29 11:34:29 -07:00
db_stress_tool Disallow refitting more than 1 file from non-L0 to L0 (#12481) 2024-03-29 10:52:36 -07:00
docs
env
examples
file
fuzz
include/rocksdb Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
java Replace ScopedArenaIterator with ScopedArenaPtr<InternalIterator> (#12470) 2024-03-22 13:40:42 -07:00
logging
memory Replace ScopedArenaIterator with ScopedArenaPtr<InternalIterator> (#12470) 2024-03-22 13:40:42 -07:00
memtable
microbench
monitoring
options
plugin
port
table Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
test_util
third-party
tools Disable `wal_bytes_per_sync` at one more place (#12492) 2024-04-02 09:44:37 -07:00
trace_replay
unreleased_history Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
util Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
utilities Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
.clang-format
.gitignore
.lgtm.yml
.watchmanconfig
AUTHORS
CMakeLists.txt Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYING
DEFAULT_OPTIONS_HISTORY.md
DUMP_FORMAT.md
HISTORY.md Branch cut 9.1.fb (#12476) 2024-03-25 15:07:43 -07:00
INSTALL.md
LANGUAGE-BINDINGS.md
LICENSE.Apache
LICENSE.leveldb
Makefile Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
PLUGINS.md
README.md
TARGETS Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
USERS.md
Vagrantfile
WINDOWS_PORT.md
common.mk
crash_test.mk
issue_template.md
rocksdb.pc.in
src.mk Add support in SstFileReader to get a raw table iterator (#12385) 2024-04-02 21:23:06 -07:00
thirdparty.inc

README.md

RocksDB: A Persistent Key-Value Store for Flash and RAM Storage

CircleCI Status

RocksDB is developed and maintained by Facebook Database Engineering Team. It is built on earlier work on LevelDB by Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)

This code is a library that forms the core building block for a fast key-value server, especially suited for storing data on flash drives. It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF) and Space-Amplification-Factor (SAF). It has multi-threaded compactions, making it especially suitable for storing multiple terabytes of data in a single database.

Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples

See the github wiki for more explanation.

The public interface is in include/. Callers should not include or rely on the details of any other header files in this package. Those internal APIs may be changed without warning.

Questions and discussions are welcome on the RocksDB Developers Public Facebook group and email list on Google Groups.

License

RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses.