Crate sst

Source
Expand description

sst stands for sorted-string-table.

This crate provides an implementation of an SST and most common cursoring patterns necessary to create something like a log-structured merge tree out of SSTs.

Re-exports§

pub use log::LogBuilder;
pub use log::LogIterator;
pub use log::LogOptions;
pub use setsum::Setsum;

Modules§

block
A block is the base unit of an SST. This module provides implementations of cursors and builders for blocks.
bounds_cursor
Bounds cursor restricts a general cursor to be between some pair of keys.
concat_cursor
file_manager
Management of open files. Intended to re-use open files and fail when too many files are open.
gc
This module implements a garbage-collecting cursor that compacts according to a garbage-collection policy.
ingest
Tools for ingesting data into a directory.
lazy_cursor
Lazy cursoring, so we can limit the number of files open at once.
log
A log is an unordered table.
merging_cursor
A MergingCursor merges several cursors together.
pruning_cursor
The primary point of the pruning cursor is to turn an in-memory skip-list into something that looks like a consistent cut of the data. Consequently, there nees to be more logic than just working on a static sst. Other cursors will assume a pruning cursor gets applied beneath them to create a cursor over an immutable data set.
reference
Reference types for comparing sst and block behavior.
sbbf
This file implements the split-block bloom-filter used by parquet: https://github.com/apache/parquet-format/blob/master/BloomFilter.md
setsum
A Setsum type that’s more ergonomic for working with key-value pairs.

Structs§

Key
A memory-owning Key.
KeyRef
A shallow, easy-to-copy reference to a key.
KeyValuePair
A KeyValuePair is an owned version of a key-value pair.
KeyValueRef
A KeyValueRef is an easy-to-copy version of a key-value pair.
Sst
An Sst represents an immutable sorted string table.
SstBuilder
Build Ssts by providing keys in-order.
SstCursor
A cursor over an Sst.
SstMetadata
Metadata about an Sst.
SstMultiBuilder
Create an SstBuilder that will create numbered files of similar prefix and suffix.
SstOptions
Options for working with Ssts.

Enums§

BlockCompression
An enum matching the types of compression supported.
Error
The sst Error type.

Constants§

CLAMP_MAX_MINIMUM_FILE_SIZE
The maximum minimum file size.
CLAMP_MAX_TARGET_BLOCK_SIZE
The maximum target block size.
CLAMP_MAX_TARGET_FILE_SIZE
The maximum target file size.
CLAMP_MIN_MINIMUM_FILE_SIZE
The minimum minimum file size.
CLAMP_MIN_TARGET_BLOCK_SIZE
The minimum target block size.
CLAMP_MIN_TARGET_FILE_SIZE
The minimum target file size.
DEFAULT_KEY
The default key is the zero key.
DEFAULT_TIMESTAMP
The default timestamp is 0.
MAX_BATCH_LEN
The maximum size of a write batch, in bytes.
MAX_KEY
The maximum key. This is eleven 0xff bytes.
MAX_KEY_LEN
The maximum length of a key.
MAX_VALUE_LEN
The maximum length of a value.
MIN_KEY
The zero key. This is the empty byte string.
TABLE_FULL_SIZE
The recommended size of a table.

Traits§

Builder
A Builder is a generic way of building a sorted (sst) or unsorted (log) string table.
Cursor
A Cursor allows for iterating through data.
IoToZ
IO to Z.

Functions§

check_key_len
Check that the key is of valid length, or return a descriptive error.
check_table_size
Check that the table size is allowable, or return a descriptive error.
check_value_len
Check that the value is of valid length, or return a descriptive error.
register_biometrics
Register this crate’s biometrics.
register_monitors
Register this crate’s monitors.