Documentation
¶
Index ¶
- Constants
- func ChangeSetGroupCmd() *cobra.Command
- func ChangeSetToVersionDBCmd() *cobra.Command
- func ConvertToSSTTSCmd() *cobra.Command
- func DumpChangeSetCmd() *cobra.Command
- func IngestSSTCmd() *cobra.Command
- func IterateChangeSets(reader Reader, fn func(version int64, changeSet *iavl.ChangeSet) (bool, error)) (int64, error)
- func IterateVersions(reader Reader, fn func(version int64) (bool, error)) (int64, error)
- func PrintChangeSetCmd() *cobra.Command
- func ReadChangeSet(reader Reader, parseChangeset bool) (int64, int64, *iavl.ChangeSet, error)
- func VerifyChangeSetCmd() *cobra.Command
- func WriteChangeSet(writer io.Writer, version int64, cs iavl.ChangeSet) error
- type Range
- type ReadCloser
- type Reader
Constants ¶
const ( ZlibFileSuffix = ".zz" SnappyFileSuffix = ".snappy" )
const ( SSTFileExtension = ".sst" DefaultSSTFileSize = 128 * 1024 * 1024 DefaultSorterChunkSize = 256 * 1024 * 1024 // SizeKeyLength is the number of bytes used to encode key length in sort payload SizeKeyLength = 4 )
const DefaultChunkSize = 1000000
Variables ¶
This section is empty.
Functions ¶
func ChangeSetGroupCmd ¶
func ChangeSetToVersionDBCmd ¶
func ConvertToSSTTSCmd ¶
func DumpChangeSetCmd ¶
func IngestSSTCmd ¶
func IterateChangeSets ¶
func IterateChangeSets( reader Reader, fn func(version int64, changeSet *iavl.ChangeSet) (bool, error), ) (int64, error)
IterateChangeSets iterate the change set files,
func IterateVersions ¶
IterateVersions iterate the version numbers in change set files, skipping the change set payloads.
func PrintChangeSetCmd ¶
func ReadChangeSet ¶
ReadChangeSet decode a version of change set from reader. if parseChangeset is false, it'll skip change set payload directly.
returns (version, number of bytes read, changeSet, err)
func VerifyChangeSetCmd ¶
func WriteChangeSet ¶
WriteChangeSet writes a version of change sets to writer.
Change set file format: ``` version: int64 size: int64 // size of whole payload payload:
delete: int8 keyLen: varint-uint64 key [ // if delete is false valueLen: varint-uint64 value ] repeat with next key-value pair
repeat with next version ```
Types ¶
type ReadCloser ¶
ReadCloser combines `Reader` and `io.Closer`.
func WrapReader ¶
func WrapReader(reader Reader, closer io.Closer) ReadCloser
WrapReader wraps reader and closer together to create an new io.ReadCloser.
The Read function will simply call the wrapped reader's Read function, while the Close function will call the wrapped closer's Close function.
If the wrapped reader is also an io.Closer, its Close function will be called in Close as well.
closer can be `nil`, to support stdin.