Question: does python-rocksdb support importing external SST files, eg for bulk loads?
See original GitHub issueTo optimize for initial large bulk loads, this Rocksdb blog post recommends creating the SST files externally (eg from a big-data pipeline like Spark/MapReduce), and importing them into your DB: http://rocksdb.org/blog/2017/02/17/bulkoad-ingest-sst-file.html
Options options;
SstFileWriter sst_file_writer(EnvOptions(), options, options.comparator);
Status s = sst_file_writer.Open(file_path);
assert(s.ok());
// Insert rows into the SST file, note that inserted keys must be
// strictly increasing (based on options.comparator)
for (...) {
s = sst_file_writer.Add(key, value);
assert(s.ok());
}
// Ingest the external SST file into the DB
s = db_->IngestExternalFile({"/home/usr/file1.sst"}, IngestExternalFileOptions());
assert(s.ok());
The post refers to the C++ Rocksdb API, eg db_->IngestExternalFile()
.
Does python-rocksdb
support this kind of “ingest external SST files” (eg db_->IngestExternalFile()
) behavior? I didn’t see this function listed in python-rocksdb
. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
Bulkloading by ingesting external SST files
Bulkloading. Write all of our keys and values into SST file outside of the DB; Add the SST file into the LSM directly....
Read more >python-rocksdb
Question : does python-rocksdb support importing external SST files, eg for ... large bulk loads, this Rocksdb blog post recommends creating the SST...
Read more >Import data from SST files
RocksDB is a storage engine based on the hard disk, providing a series of APIs for creating and importing SST files to help...
Read more >Creating RocksDB SST file in Java for bulk loading
I think I found the problem with the code. The keys must be in order for the SST. The way I do the...
Read more >TiDB Tools (II): Introducing TiDB Lightning
TiDB Lightning is designed for quickly importing a large MySQL dump ... and RocksDB stores the persistent data as a series of “SST”...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This library has SstFileWriter and ingestExternalFile implemented: https://github.com/Congyuwang/RocksDict.
pip install rocksdict
. With pre-build wheels, no need to compile.Build Write Demo:
Yeah, that’s right. Let me fix it.