rocksdb/examples
Yueh-Hsuan Chiang 74b100ac17 RocksDB Options file format and its serialization / deserialization.
Summary:
This patch defines the format of RocksDB options file, which
follows the INI file format, and implements functions for its
serialization and deserialization.  An example RocksDB options
file can be found in examples/rocksdb_option_file_example.ini.

A typical RocksDB options file has three sections, which are
Version, DBOptions, and more than one CFOptions.  The RocksDB
options file in general follows the basic INI file format
with the following extensions / modifications:
 * Escaped characters
   We escaped the following characters:
    - \n -- line feed - new line
    - \r -- carriage return
    - \\ -- backslash \
    - \: -- colon symbol :
    - \# -- hash tag #
 * Comments
   We support # style comments.  Comments can appear at the ending
   part of a line.
 * Statements
   A statement is of the form option_name = value.
   Each statement contains a '=', where extra white-spaces
   are supported. However, we don't support multi-lined statement.
   Furthermore, each line can only contain at most one statement.
 * Section
   Sections are of the form [SecitonTitle "SectionArgument"],
   where section argument is optional.
 * List
   We use colon-separated string to represent a list.
   For instance, n1:n2:n3:n4 is a list containing four values.

Below is an example of a RocksDB options file:

[Version]
  rocksdb_version=4.0.0
  options_file_version=1.0
[DBOptions]
  max_open_files=12345
  max_background_flushes=301
[CFOptions "default"]
[CFOptions "the second column family"]
[CFOptions "the third column family"]

Test Plan: Added many tests in options_test.cc

Reviewers: igor, IslamAbdelRahman, sdong, anthony

Reviewed By: anthony

Subscribers: maykov, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D46059
2015-09-29 14:42:40 -07:00
..
.gitignore Fix compact_files_example 2015-08-25 12:29:44 -07:00
c_simple_example.c fix typo in c_simple_example 2015-05-22 16:13:11 -07:00
column_families_example.cc
compact_files_example.cc Fix compact_files_example 2015-08-25 12:29:44 -07:00
Makefile Fix compact_files_example 2015-08-25 12:29:44 -07:00
optimistic_transaction_example.cc Pessimistic Transactions 2015-08-11 17:52:23 -07:00
README.md
rocksdb_option_file_example.ini RocksDB Options file format and its serialization / deserialization. 2015-09-29 14:42:40 -07:00
simple_example.cc
transaction_example.cc Pessimistic Transactions 2015-08-11 17:52:23 -07:00

Compile RocksDB first by executing make static_lib in parent dir