pdb

package
v0.0.0-...-e8d7442 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSTABLE_MAX_BLOCK_SIZE = uint32(4 * 1024 * 1024)        // this is a soft limit, it helps keep operation relatively small
	SSTABLE_MAX_FILE_SIZE  = uint32(1 * 1024 * 1024 * 1024) // max file keeps total file small
	SSTABLE_MAX_RECORDS    = uint32(1024 * 1024)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IJournal

type IJournal interface {
	// each pdb has one journal
	Version() uint32                // Version
	ConsensusID() util.IConsensusID // Consensus ID
	Domain() string                 // Domain Name
	// operations
	Append(r []util.IRecord) error     // append a list of records
	AppendRecord(r util.IRecord) error // append a record
}

type IMemTable

type IMemTable interface {
	// SSTable Level Attributes
	Version() uint32                // Version
	ConsensusID() util.IConsensusID // Consensus ID
	Domain() string                 // Domain Name
	Table() string                  // Table Name
	// operations
	Get(key, scheme util.IData) util.IRecord
	Set(record util.IRecord) error
	Groups(key, scheme util.IData) []string
	Keys(key, scheme util.IData) []util.IData
}

type IPdb

type IPdb interface {
	// each pdb has one journal
	Version() uint32                // Version
	ConsensusID() util.IConsensusID // Consensus ID
	Domain() string                 // Domain Name
	// operations
	Get(table string, key util.IData, group string) util.IRecord
	Set(table string, record util.IRecord) error
	Groups(table string, key, scheme util.IData) util.IData
	Keys(table string, key, scheme util.IData) util.IData
}

type ISSTable

type ISSTable interface {
	// SSTable Level Attributes
	Version() uint32                // Version
	ConsensusID() util.IConsensusID // Consensus ID
	Domain() string                 // Domain Name
	Table() string                  // Table Name
	StartTime() util.IConsensusTime // Start Time
	EndTime() util.IConsensusTime   // End Time
	StartKey() util.IData           // Start Key
	EndKey() util.IData             // End Key
	Level() uint32                  // Level
	Count() uint32                  // Record Count
	// Record Operations
	Get(key, group *util.IData) (util.IRecord, error) // get record with specified key and attribute group
	Groups(key, scheme util.IData) ([]string, error)
	Keys(key, scheme util.IData) ([]util.IData, error)
	Read(pos, suggest_offset uint32) ([]util.IRecord, uint32, error) // Batch scan and read operation, return a list of IRecord, bytes read, or error
	// Close the resource
	Close() error
}

type ITablet

type ITablet interface {
	// SSTable Level Attributes
	Version() uint32                // Version
	ConsensusID() util.IConsensusID // Consensus ID
	Domain() string                 // Domain Name
	Table() string                  // Table Name
	// operations
	Get(key, scheme util.IData) util.IRecord
	Set(record util.IRecord) error
	Groups(key, scheme util.IData) []string
	Keys(key, scheme util.IData) []util.IData
}

type JournalV1

type JournalV1 struct {
}

type PdbV1

type PdbV1 struct {
}

type SSTableV1

type SSTableV1 struct {
	// contains filtered or unexported fields
}

func LoadSSTableV1

func LoadSSTableV1(filepath string) (t *SSTableV1, err error)

func (*SSTableV1) Close

func (t *SSTableV1) Close() error

func (*SSTableV1) ConsensusID

func (t *SSTableV1) ConsensusID() util.IConsensusID

func (*SSTableV1) Domain

func (t *SSTableV1) Domain() []byte

func (*SSTableV1) EndKey

func (t *SSTableV1) EndKey() util.IData

func (*SSTableV1) EndTime

func (t *SSTableV1) EndTime() util.IConsensusTime

func (*SSTableV1) Get

func (t *SSTableV1) Get(key, group *util.IData) (util.IRecord, error)

func (*SSTableV1) Groups

func (t *SSTableV1) Groups(key *util.IData) ([]util.IData, error)

func (*SSTableV1) Keys

func (t *SSTableV1) Keys(key *util.IData) ([]util.IData, error)

func (*SSTableV1) Level

func (t *SSTableV1) Level() uint32

func (*SSTableV1) Read

func (t *SSTableV1) Read(pos, suggest_offset uint32) ([]util.IRecord, uint32, error)

func (*SSTableV1) StartKey

func (t *SSTableV1) StartKey() util.IData

func (*SSTableV1) StartTime

func (t *SSTableV1) StartTime() util.IConsensusTime

func (*SSTableV1) Table

func (t *SSTableV1) Table() []byte

func (*SSTableV1) Version

func (t *SSTableV1) Version() uint32

type Tablet

type Tablet struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL