mirror of https://github.com/facebook/rocksdb.git
5679107b07
Summary: Completed the implementation for the Redis API for Lists. The Redis API uses rocksdb as a backend to persistently store maps from key->list. It supports basic operations for appending, inserting, pushing, popping, and accessing a list, given its key. Test Plan: - Compile with: make redis_test - Test with: ./redis_test - Run all unit tests (for all rocksdb) with: make all check - To use an interactive REDIS client use: ./redis_test -m - To clean the database before use: ./redis_test -m -d Reviewers: haobo, dhruba, zshao Reviewed By: haobo CC: leveldb Differential Revision: https://reviews.facebook.net/D10833 |
||
---|---|---|
.. | ||
README | ||
redis_list_exception.h | ||
redis_list_iterator.h | ||
redis_lists.cc | ||
redis_lists.h | ||
redis_lists_test.cc |
README
This folder defines a REDIS-style interface for Rocksdb. Right now it is written as a simple tag-on in the leveldb::RedisLists class. It implements Redis Lists, and supports only the "non-blocking operations". Internally, the set of lists are stored in a rocksdb database, mapping keys to values. Each "value" is the list itself, storing a sequence of "elements". Each element is stored as a 32-bit-integer, followed by a sequence of bytes. The 32-bit-integer represents the length of the element (that is, the number of bytes that follow). And then that many bytes follow. NOTE: This README file may be old. See the actual redis_lists.cc file for definitive details on the implementation. There should be a header at the top of that file, explaining a bit of the implementation details.