db

package
v0.0.0-...-25c693f Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package db implements ...

Index

Constants

This section is empty.

Variables

View Source
var (
	HINT     = "HINT"
	DoREPAIR = "READ-REPAIR"
)

HINT string

View Source
var (
	// SSTableTmpFile is the tmp file name for sstable
	SSTableTmpFile      = "tmp"
	SSTVersion          = int64(0)
	SSTIndexMetadataMap map[string][]*KeyPositionInfo
	// every 128th key is an index
	SSTIndexInterval = 128
	// key associated with block index written to disk
	SSTBlockIndexKey = "BLOCK-INDEX"
	// position in SSTable after the first Block Index
	SSTPositionAfterFirstBlockIndex = int64(0)
	// this map has the SSTable as key and a BloomFilter
	// as value. This BloomFilter will tell us if a key/
	// column pair is in the SSTable. If not, we can avoid
	// scanning it.
	SSTbfs = make(map[string]*utils.BloomFilter)
	// maintains a touched set of keys
	SSTTouchCache = NewTouchKeyCache(config.TouchKeyCacheSize)

	SSTBlkIdxKey = "BLOCK-INDEX"
)

*

View Source
var CFSerializer = NewCFSerializer()

CFSerializer ...

View Source
var CIndexer = &ColumnIndexer{}

CIndexer ...

View Source
var CSerializer = NewColumnSerializer()

CSerializer ...

View Source
var SCSerializer = NewSuperColumnSerializer()

SCSerializer ...

Functions

func DeliverHintsToEndpoint

func DeliverHintsToEndpoint(endpoint *network.EndPoint)

DeliverHintsToEndpoint ...

func DoRowMutation

func DoRowMutation(args *RowMutationArgs, reply *RowMutationReply) error

DoRowMutation ...

func DoRowRead

func DoRowRead(args *RowReadArgs, reply *RowReadReply) error

DoRowRead ...

Types

type AColumnFactory

type AColumnFactory interface {
	// contains filtered or unexported methods
}

AColumnFactory -> Abstract Column Factory ColumnFactory and SuperColumnFactory are two specific impl.

type AQueryFilter

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

AQueryFilter ...

func NewAQueryFilter

func NewAQueryFilter(key string, path *QueryPath) *AQueryFilter

NewAQueryFilter ...

type AReadCommand

type AReadCommand struct {
	Table       string
	Key         string
	QPath       QueryPath
	CommandType byte
}

AReadCommand ...

func NewAReadCommand

func NewAReadCommand(table, key string, queryPath QueryPath, cmdType byte) *AReadCommand

NewAReadCommand ...

type AbstractColumnIterator

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

AbstractColumnIterator ...

func NewAColumnIterator

func NewAColumnIterator(curIndex int, columnFamily *ColumnFamily,
	columns []IColumn) *AbstractColumnIterator

NewAColumnIterator ...

type BinaryMemtable

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

BinaryMemtable is the binary version of memtable

func NewBinaryMemtable

func NewBinaryMemtable(table, cfName string) *BinaryMemtable

NewBinaryMemtable initializes a BinaryMemtable

type BlockMetadata

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

BlockMetadata ...

func NewBlockMetadata

func NewBlockMetadata(position, size int64) *BlockMetadata

NewBlockMetadata ...

type ByFileName

type ByFileName []string

ByFileName ...

func (ByFileName) Len

func (p ByFileName) Len() int

Len ...

func (ByFileName) Less

func (p ByFileName) Less(i, j int) bool

Less ...

func (ByFileName) Swap

func (p ByFileName) Swap(i, j int)

Swap ...

type ByKey

type ByKey []string

ByKey ...

func (ByKey) Len

func (p ByKey) Len() int

Len ...

func (ByKey) Less

func (p ByKey) Less(i, j int) bool

Less ...

func (ByKey) Swap

func (p ByKey) Swap(i, j int)

Swap ...

type ByName

type ByName []*FileStruct

ByName ...

func (ByName) Len

func (p ByName) Len() int

Len ...

func (ByName) Less

func (p ByName) Less(i, j int) bool

Less ...

func (ByName) Swap

func (p ByName) Swap(i, j int)

Swap ...

type ByPart

type ByPart []*PrimaryKey

ByPart provides comparator by partition type

func (ByPart) Len

func (p ByPart) Len() int

Len ...

func (ByPart) Less

func (p ByPart) Less(i, j int) bool

Less ...

func (ByPart) Swap

func (p ByPart) Swap(i, j int)

Swap ...

type ByTime

type ByTime []string

ByTime provide struct to sort file by timestamp

func (ByTime) Len

func (a ByTime) Len() int

Len implements the length of the slice

func (ByTime) Less

func (a ByTime) Less(i, j int) bool

Less implements less comparator

func (ByTime) Swap

func (a ByTime) Swap(i, j int)

Swap implements swap method

type CollatedIterator

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

CollatedIterator ...

func NewCollatedIterator

func NewCollatedIterator(iterators []ColumnIterator) *CollatedIterator

NewCollatedIterator ...

type Column

type Column struct {
	Name      string
	Value     string
	Timestamp int64
	// contains filtered or unexported fields
}

Column stores name and value etc.

func NewColumn

func NewColumn(name, value string, timestamp int64, deleteMark bool) Column

NewColumn constructs a Column

func NewColumnKV

func NewColumnKV(name, value string) Column

NewColumnKV ..

func (Column) GetName

func (c Column) GetName() string

GetName ...

func (Column) GetSubColumns

func (c Column) GetSubColumns() map[string]IColumn

GetSubColumns ...

func (Column) GetTimestamp

func (c Column) GetTimestamp() int64

GetTimestamp ...

func (Column) GetValue

func (c Column) GetValue() []byte

GetValue ..

func (Column) IsMarkedForDelete

func (c Column) IsMarkedForDelete() bool

IsMarkedForDelete ...

type ColumnFactory

type ColumnFactory struct{}

ColumnFactory implements AColumnFactory

type ColumnFamily

type ColumnFamily struct {
	ColumnFamilyName string
	ColumnType       string
	Factory          AColumnFactory
	Columns          map[string]IColumn
	// contains filtered or unexported fields
}

ColumnFamily definition

func NewColumnFamily

func NewColumnFamily(columnFamilyName, columnType string) *ColumnFamily

NewColumnFamily create a new column family, set columnfactory according to its type

func (*ColumnFamily) CreateColumn

func (cf *ColumnFamily) CreateColumn(columnName, value string, timestamp int64)

CreateColumn setup a new column in columnFamily

func (*ColumnFamily) GetColumn

func (cf *ColumnFamily) GetColumn(name string) IColumn

GetColumn ...

func (*ColumnFamily) GetSortedColumns

func (cf *ColumnFamily) GetSortedColumns() []IColumn

GetSortedColumns ...

func (*ColumnFamily) IsSuper

func (cf *ColumnFamily) IsSuper() bool

IsSuper ...

type ColumnFamilySerializer

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

ColumnFamilySerializer ...

func NewCFSerializer

func NewCFSerializer() *ColumnFamilySerializer

NewCFSerializer ...

type ColumnFamilyStore

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

ColumnFamilyStore provides storage specification of column family

func NewColumnFamilyStore

func NewColumnFamilyStore(table, columnFamily string) *ColumnFamilyStore

NewColumnFamilyStore initializes a new ColumnFamilyStore

type ColumnGroupReader

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

ColumnGroupReader finds the block for a starting column and returns blocks before/after it for each next call. This function assumes that the CF is sorted by name and exploits the name index

func NewColumnGroupReader

func NewColumnGroupReader(ssTable *SSTableReader, key string, position int64, startColumn []byte, reversed bool) *ColumnGroupReader

NewColumnGroupReader ...

type ColumnIndexer

type ColumnIndexer struct{}

ColumnIndexer ...

type ColumnIterator

type ColumnIterator interface {
	// contains filtered or unexported methods
}

ColumnIterator ...

type ColumnSerializer

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

ColumnSerializer ...

func NewColumnSerializer

func NewColumnSerializer() *ColumnSerializer

NewColumnSerializer ...

type CommitLog

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

CommitLog tracks every write operation into the system. The aim of the commit log is to be able to successfully recover data that was not stored to disk via the memtable. Every commit log maintains a header represented by the abstraction CommitLogHeader. The header contains a bit array and an array of int64 and both the arrays are of size: # column families. Whenever a ColumnFamily is written to, for the first time its bit flag is set to one in the CommitLogHeader. When it is flushed to disk by the Memtable its corresponding bit in the header is set to zero. This helps track which CommitLog can be thrown away as a result of Memtable flushes. However if a ColumnFamily is flushed and again written to disk then its entry in the array of int64 is updated with the offset in the CommitLog file where it was written. This helps speed up recovery since we can seek to these offsets and start processing the commit log. Every Commit Log is rolled over everytime it reaches its threshold in size. Over time there could be a number of commit logs that would be generated. However whenever we flush a column family disk and update its bit flag we take this bit array and bitwise & it with the headers of the other commit logs that are older.

func NewCommitLog

func NewCommitLog(table string, recoveryMode bool) *CommitLog

NewCommitLog creates a new commit log

func NewCommitLogE

func NewCommitLogE(recoveryMode bool) *CommitLog

NewCommitLogE creates a new commit log

type CommitLogContext

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

CommitLogContext represents the context of commit log

func NewCommitLogContext

func NewCommitLogContext(file string, position int64) *CommitLogContext

NewCommitLogContext creates a new commitLogContext

type CommitLogHeader

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

CommitLogHeader represents the header of commit log

func NewCommitLogHeader

func NewCommitLogHeader(size int) *CommitLogHeader

NewCommitLogHeader creates a new commit log header size is the number of column families

func NewCommitLogHeaderC

func NewCommitLogHeaderC(clHeader *CommitLogHeader) *CommitLogHeader

NewCommitLogHeaderC used in copy

func NewCommitLogHeaderD

func NewCommitLogHeaderD(dirty *bitset.BitSet, lastFlushedAt []int) *CommitLogHeader

NewCommitLogHeaderD used in deserializing

type FPQ

type FPQ []*FileStruct

FPQ is a priority queue of FileStruct

func (FPQ) Len

func (pq FPQ) Len() int

Len ...

func (FPQ) Less

func (pq FPQ) Less(i, j int) bool

Less ...

func (*FPQ) Pop

func (pq *FPQ) Pop() interface{}

Pop ...

func (*FPQ) Push

func (pq *FPQ) Push(x interface{})

Push ...

func (FPQ) Swap

func (pq FPQ) Swap(i, j int)

Swap ...

type FileSSTableMap

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

FileSSTableMap ...

func NewFileSSTableMap

func NewFileSSTableMap() *FileSSTableMap

NewFileSSTableMap ...

type FileStruct

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

FileStruct ...

func NewFileStruct

func NewFileStruct(s *SSTableReader) *FileStruct

NewFileStruct ...

type HintedHandOffManager

type HintedHandOffManager struct{}

HintedHandOffManager ...

var (
	HHOMInstance *HintedHandOffManager
)

HHOMInstance ...

func GetHintedHandOffManagerInstance

func GetHintedHandOffManagerInstance() *HintedHandOffManager

GetHintedHandOffManagerInstance ...

func (*HintedHandOffManager) DeliverHints

func (h *HintedHandOffManager) DeliverHints(to *network.EndPoint)

DeliverHints ...

type IColumn

type IColumn interface {
	GetName() string

	GetTimestamp() int64

	GetSubColumns() map[string]IColumn

	IsMarkedForDelete() bool

	GetValue() []byte
	// contains filtered or unexported methods
}

IColumn provide interface for Column and SuperColumn

type IColumnSerializer

type IColumnSerializer interface {
	// contains filtered or unexported methods
}

IColumnSerializer ...

type IdentityQueryFilter

type IdentityQueryFilter struct {
	*SliceQueryFilter
	// contains filtered or unexported fields
}

IdentityQueryFilter ...

type IndexInfo

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

IndexInfo ...

func NewIndexInfo

func NewIndexInfo(firstName []byte, lastName []byte, offset int64, width int64) *IndexInfo

NewIndexInfo ...

type IteratingRow

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

IteratingRow ...

func NewIteratingRow

func NewIteratingRow(file *os.File, sstable *SSTableReader) *IteratingRow

NewIteratingRow ...

type KeyPositionInfo

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

KeyPositionInfo contains index key and its corresponding position in the data file. Binary search is performed on a list of these objects to lookup keys within the SSTable data file.

func NewKeyPositionInfo

func NewKeyPositionInfo(key string, position int64) *KeyPositionInfo

NewKeyPositionInfo ...

type Manager

type Manager struct {
}

Manager manages database

func GetManagerInstance

func GetManagerInstance() *Manager

GetManagerInstance return an instance of DBManager

func (*Manager) Start

func (d *Manager) Start() *StorageMetadata

Start reads the system table and retrives the metadata associated with this storage instance. The metadata is stored in a Column Family called LocationInfo which has two columns: "Token" and "Generation". This is the token that gets gossiped around and the generation info is used for FD. We also store whether we're in bootstrap mode in a third column.

type Memtable

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

Memtable specifies memtable

func NewMemtable

func NewMemtable(table, cfName string) *Memtable

NewMemtable initializes a new memtable

type MemtableManager

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

MemtableManager coordinates memtables to be flushed into disk

func GetMemtableManager

func GetMemtableManager() *MemtableManager

GetMemtableManager will retrieve memtableManagerInstance or create a new one if not exist

func NewMemtableManager

func NewMemtableManager() *MemtableManager

NewMemtableManager creates a new MemtableManager

type NamesQueryFilter

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

NamesQueryFilter ...

type PrimaryKey

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

PrimaryKey ...

func NewPrimaryKey

func NewPrimaryKey(key string) *PrimaryKey

NewPrimaryKey ...

type QueryFilter

type QueryFilter interface {
	// contains filtered or unexported methods
}

QueryFilter ...

func NewIdentityQueryFilter

func NewIdentityQueryFilter(key string, path *QueryPath) QueryFilter

NewIdentityQueryFilter ...

func NewNamesQueryFilter

func NewNamesQueryFilter(key string, columnParent *QueryPath, column []byte) QueryFilter

NewNamesQueryFilter ...

func NewNamesQueryFilterS

func NewNamesQueryFilterS(key string, columnParent *QueryPath, columns [][]byte) QueryFilter

NewNamesQueryFilterS ...

type QueryPath

type QueryPath struct {
	ColumnFamilyName string
	SuperColumnName  []byte
	ColumnName       []byte
}

QueryPath ...

func NewQueryPath

func NewQueryPath(columnFamilyName string, superColumnName, columnName []byte) *QueryPath

NewQueryPath ...

func NewQueryPathCF

func NewQueryPathCF(columnFamilyName string) *QueryPath

NewQueryPathCF ...

type ReadCommand

type ReadCommand interface {
	GetKey() string
	GetQPath() QueryPath
	GetCFName() string
	GetTable() string
	GetRow(table *Table) *Row
}

ReadCommand ...

type RecoveryManager

type RecoveryManager struct {
}

RecoveryManager manages recovery

func GetRecoveryManager

func GetRecoveryManager() *RecoveryManager

GetRecoveryManager fetch existing instance or create a new one.

func NewRecoveryManager

func NewRecoveryManager() *RecoveryManager

NewRecoveryManager creates a new instance

type Row

type Row struct {
	Table          string
	Key            string
	ColumnFamilies map[string]*ColumnFamily
	Size           int32
}

Row for key and cf

func NewRow

func NewRow(key string) *Row

NewRow init a Row with given key

func NewRowT

func NewRowT(table, key string) *Row

NewRowT init a Row with given table name and key name

type RowMutation

type RowMutation struct {
	TableName    string
	RowKey       string
	Modification map[string]*ColumnFamily
}

RowMutation definition

func NewRowMutation

func NewRowMutation(tableName, rowKey string) RowMutation

NewRowMutation creates a new row mutation

func NewRowMutationR

func NewRowMutationR(tableName string, row *Row) *RowMutation

NewRowMutationR init it with given row

func (*RowMutation) Add

func (rm *RowMutation) Add(columnFamilyColumn, value string, timestamp int64)

Add store columnFamilyName and columnName inside rowMutation

func (*RowMutation) AddCF

func (rm *RowMutation) AddCF(columnFamily *ColumnFamily)

AddCF adds column family to modification

func (*RowMutation) AddHints

func (rm *RowMutation) AddHints(key, host string)

AddHints ...

func (*RowMutation) AddQ

func (rm *RowMutation) AddQ(path *QueryPath, value []byte, timestamp int64)

AddQ ...

func (*RowMutation) Apply

func (rm *RowMutation) Apply(row *Row)

Apply is equivalent to calling commit. This will applies the changes to the table that is obtained by calling Table.open()

func (*RowMutation) ApplyE

func (rm *RowMutation) ApplyE()

ApplyE receives empty argument

func (*RowMutation) Delete

func (rm *RowMutation) Delete(path *QueryPath, timestamp int64)

Delete ...

type RowMutationArgs

type RowMutationArgs struct {
	HeaderKey   string
	HeaderValue network.EndPoint
	From        network.EndPoint
	RM          RowMutation
}

RowMutationArgs for rm arguments

type RowMutationReply

type RowMutationReply struct {
	Result string
	Status bool
}

RowMutationReply for rm reply structure

type RowReadArgs

type RowReadArgs struct {
	HeaderKey   string
	HeaderValue network.EndPoint
	From        network.EndPoint
	RCommand    ReadCommand
}

RowReadArgs ...

type RowReadReply

type RowReadReply struct {
	Result string
	Status bool
	R      *Row
}

RowReadReply ...

type SSTable

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

SSTable is the struct for SSTable

func NewSSTable

func NewSSTable(filename string) *SSTable

NewSSTable initializes a SSTable

func NewSSTableP

func NewSSTableP(directory, filename, pType string) *SSTable

NewSSTableP is used for DB writes into the SSTable Use this version to write to the SSTable

type SSTableNamesIterator

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

SSTableNamesIterator ...

func NewSSTableNamesIterator

func NewSSTableNamesIterator(sstable *SSTableReader, key string, columns [][]byte) *SSTableNamesIterator

NewSSTableNamesIterator ...

type SSTableReader

type SSTableReader struct {
	*SSTable
}

SSTableReader ...

func NewSSTableReader

func NewSSTableReader(filename string) *SSTableReader

NewSSTableReader ...

func NewSSTableReaderI

func NewSSTableReaderI(filename string, indexPositions []*KeyPositionInfo, bf *utils.BloomFilter) *SSTableReader

NewSSTableReaderI ...

type SSTableSliceIterator

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

SSTableSliceIterator ...

func NewSSTableSliceIterator

func NewSSTableSliceIterator(ssTable *SSTableReader, key string, startColumn []byte, reversed bool) *SSTableSliceIterator

NewSSTableSliceIterator ...

type SSTableWriter

type SSTableWriter struct {
	*SSTable
	// contains filtered or unexported fields
}

SSTableWriter ...

func NewSSTableWriter

func NewSSTableWriter(filename string, keyCount int) *SSTableWriter

NewSSTableWriter ...

type SimpleColumnIterator

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

SimpleColumnIterator ...

func NewSColumnIterator

func NewSColumnIterator(curIndex int, cf *ColumnFamily, columns [][]byte) *SimpleColumnIterator

NewSColumnIterator ...

type SliceByNamesReadCommand

type SliceByNamesReadCommand struct {
	*AReadCommand
	// contains filtered or unexported fields
}

SliceByNamesReadCommand ...

func NewSliceByNamesReadCommand

func NewSliceByNamesReadCommand(table, key string, path QueryPath, columnNames [][]byte) *SliceByNamesReadCommand

NewSliceByNamesReadCommand ...

func (*SliceByNamesReadCommand) GetCFName

func (s *SliceByNamesReadCommand) GetCFName() string

GetCFName ...

func (*SliceByNamesReadCommand) GetKey

func (s *SliceByNamesReadCommand) GetKey() string

GetKey ...

func (*SliceByNamesReadCommand) GetQPath

func (s *SliceByNamesReadCommand) GetQPath() QueryPath

GetQPath ...

func (*SliceByNamesReadCommand) GetRow

func (s *SliceByNamesReadCommand) GetRow(table *Table) *Row

GetRow ...

func (*SliceByNamesReadCommand) GetTable

func (s *SliceByNamesReadCommand) GetTable() string

GetTable ...

type SliceFromReadCommand

type SliceFromReadCommand struct {
	*AReadCommand
	Start    []byte
	Finish   []byte
	Reversed bool
	Count    int
}

SliceFromReadCommand ...

func NewSliceFromReadCommand

func NewSliceFromReadCommand(table, key string, path QueryPath, start, finish []byte,
	reversed bool, count int) *SliceFromReadCommand

NewSliceFromReadCommand ...

func (*SliceFromReadCommand) GetCFName

func (s *SliceFromReadCommand) GetCFName() string

GetCFName ...

func (*SliceFromReadCommand) GetKey

func (s *SliceFromReadCommand) GetKey() string

GetKey ...

func (*SliceFromReadCommand) GetQPath

func (s *SliceFromReadCommand) GetQPath() QueryPath

GetQPath ...

func (*SliceFromReadCommand) GetRow

func (s *SliceFromReadCommand) GetRow(table *Table) *Row

GetRow ...

func (*SliceFromReadCommand) GetTable

func (s *SliceFromReadCommand) GetTable() string

GetTable ...

type SliceQueryFilter

type SliceQueryFilter struct {
	*AQueryFilter
	// contains filtered or unexported fields
}

SliceQueryFilter ...

func NewSliceQueryFilter

func NewSliceQueryFilter(key string, columnParent *QueryPath, start, finish []byte,
	reversed bool, count int) *SliceQueryFilter

NewSliceQueryFilter ...

type StorageMetadata

type StorageMetadata struct {
	StorageID  string
	Generation int
}

StorageMetadata stores id and generation

func (*StorageMetadata) GetGeneration

func (s *StorageMetadata) GetGeneration() int

GetGeneration return generation for this storage metadata

type SuperColumn

type SuperColumn struct {
	Name    string
	Columns map[string]IColumn

	Timestamp int64
	// contains filtered or unexported fields
}

SuperColumn implements IColumn interface

func NewSuperColumn

func NewSuperColumn(name string) SuperColumn

NewSuperColumn constructs a SuperColun

func NewSuperColumnN

func NewSuperColumnN(name string, subcolumns map[string]IColumn) SuperColumn

NewSuperColumnN constructs a SuperColun

func (SuperColumn) GetName

func (sc SuperColumn) GetName() string

GetName ...

func (SuperColumn) GetSubColumns

func (sc SuperColumn) GetSubColumns() map[string]IColumn

GetSubColumns ...

func (SuperColumn) GetTimestamp

func (sc SuperColumn) GetTimestamp() int64

GetTimestamp ...

func (SuperColumn) GetValue

func (sc SuperColumn) GetValue() []byte

GetValue ...

func (SuperColumn) IsMarkedForDelete

func (sc SuperColumn) IsMarkedForDelete() bool

IsMarkedForDelete ...

func (SuperColumn) Remove

func (sc SuperColumn) Remove(name string)

Remove ...

type SuperColumnFactory

type SuperColumnFactory struct{}

SuperColumnFactory implements AColumnFactory

type SuperColumnSerializer

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

SuperColumnSerializer ...

func NewSuperColumnSerializer

func NewSuperColumnSerializer() *SuperColumnSerializer

NewSuperColumnSerializer ...

type Table

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

Table ...

func NewTable

func NewTable(tableName string) *Table

NewTable create a Table

func OpenTable

func OpenTable(table string) *Table

OpenTable ...

type TableMetadata

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

TableMetadata stores infos about table and its columnFamilies

func NewTableMetadata

func NewTableMetadata() *TableMetadata

NewTableMetadata initializes a TableMetadata

func (*TableMetadata) Add

func (t *TableMetadata) Add(cf string, id int, tp string)

Add adds column family, id and typename to table metadata

type TouchKeyCache

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

TouchKeyCache implements LRU cache

func NewTouchKeyCache

func NewTouchKeyCache(size int) *TouchKeyCache

NewTouchKeyCache initializes a cache with given size

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳