Documentation
¶
Index ¶
- Constants
- Variables
- func NewDiscardManager(si map[uint64]pb.StreamInfo) *discardManager
- type OpenStreamFunc
- type Option
- type OptionFunc
- type RangePartition
- func (rp *RangePartition) CanSplit() bool
- func (rp *RangePartition) Close() error
- func (rp *RangePartition) Connect() error
- func (rp *RangePartition) Delete(key []byte) error
- func (rp *RangePartition) Get(userKey []byte, version uint64) ([]byte, error)
- func (rp *RangePartition) GetSplitPoint() []byte
- func (rp *RangePartition) IsUserKeyInRange(userKey []byte) bool
- func (rp *RangePartition) LogRowStreamEnd() (uint32, uint32)
- func (rp *RangePartition) Range(prefix []byte, start []byte, limit uint32) [][]byte
- func (rp *RangePartition) Write(key, value []byte) error
- func (rp *RangePartition) WriteAsync(key, value []byte, f func(error))
- type SetRowStreamTableFunc
Constants ¶
View Source
const ( KB = 1024 MB = KB * 1024 )
Variables ¶
View Source
var (
ErrBlockedWrites = errors.New("Writes are blocked, possibly due to DropAll or Close")
)
Functions ¶
func NewDiscardManager ¶
func NewDiscardManager(si map[uint64]pb.StreamInfo) *discardManager
Types ¶
type OpenStreamFunc ¶
type OpenStreamFunc func(si pb.StreamInfo) streamclient.StreamClient
type OptionFunc ¶
type OptionFunc func(*Option)
func DefaultOption ¶
func DefaultOption() OptionFunc
func TestOption ¶
func TestOption() OptionFunc
func WithMaxSkipList ¶
func WithMaxSkipList(n int64) OptionFunc
func WithSync ¶
func WithSync(b bool) OptionFunc
func WriteChCapacity ¶
func WriteChCapacity(n int) OptionFunc
type RangePartition ¶
type RangePartition struct { utils.SafeMutex //protect mt,imm when swapping mt, imm PartID uint64 StartKey []byte EndKey []byte // contains filtered or unexported fields }
func OpenRangePartition ¶
func OpenRangePartition(id uint64, rowStream streamclient.StreamClient, logStream streamclient.StreamClient, blockReader streamclient.BlockReader, startKey []byte, endKey []byte, tableLocs []*pspb.Location, blobStreams []uint64, setlocs SetRowStreamTableFunc, openStream OpenStreamFunc, opts ...OptionFunc, ) (*RangePartition, error)
func (*RangePartition) CanSplit ¶
func (rp *RangePartition) CanSplit() bool
split相关, 提供相关参数给上层 ADD more policy here, to support different Split policy
func (*RangePartition) Close ¶
func (rp *RangePartition) Close() error
func (*RangePartition) Connect ¶
func (rp *RangePartition) Connect() error
read metaStream, connect commitlog, rowDataStreamand blobDataStream
func (*RangePartition) Delete ¶
func (rp *RangePartition) Delete(key []byte) error
func (*RangePartition) Get ¶
func (rp *RangePartition) Get(userKey []byte, version uint64) ([]byte, error)
func (*RangePartition) GetSplitPoint ¶
func (rp *RangePartition) GetSplitPoint() []byte
split相关, 提供相关参数给上层 ADD more policy here, to support different Split policy
func (*RangePartition) IsUserKeyInRange ¶
func (rp *RangePartition) IsUserKeyInRange(userKey []byte) bool
func (*RangePartition) LogRowStreamEnd ¶
func (rp *RangePartition) LogRowStreamEnd() (uint32, uint32)
func (*RangePartition) Range ¶
func (rp *RangePartition) Range(prefix []byte, start []byte, limit uint32) [][]byte
func (*RangePartition) Write ¶
func (rp *RangePartition) Write(key, value []byte) error
req.Wait will free the request
func (*RangePartition) WriteAsync ¶
func (rp *RangePartition) WriteAsync(key, value []byte, f func(error))
Source Files
¶
Click to show internal directories.
Click to hide internal directories.