Documentation ¶
Index ¶
- Constants
- func BoolToFloat(value bool) float64
- func Contains(stringList []string, elem string) bool
- func DeleteKeysWithPrefix(keyPrefix string, db badgerwrap.DB, deletionBatchSize int, ...) (error, uint64, uint64)
- func GetFilePath(filePath string, fileName string) string
- func GetKeysForPrefix(db badgerwrap.DB, keyPrefix string) []string
- func GetPartitionsInfo(db badgerwrap.DB) (map[string]*PartitionInfo, uint64)
- func GetSortedPartitionIDs(partitionsInfoMap map[string]*PartitionInfo) []string
- func GetTotalKeyCount(db badgerwrap.DB, keyPrefix string) uint64
- func Max(x int, y int) int
- func ParseKey(key string) (error, []string)
- func PrintKeyHistogram(db badgerwrap.DB)
- func Truncate(text string, width int, delimiter ...string) (string, error)
- type PartitionInfo
- type SloopKey
Constants ¶
View Source
const (
GlogVerbose = 10
)
Variables ¶
This section is empty.
Functions ¶
func BoolToFloat ¶
func DeleteKeysWithPrefix ¶
func DeleteKeysWithPrefix(keyPrefix string, db badgerwrap.DB, deletionBatchSize int, numOfKeysToDelete uint64) (error, uint64, uint64)
deletes the keys with a given prefix
func GetFilePath ¶
func GetKeysForPrefix ¶
func GetKeysForPrefix(db badgerwrap.DB, keyPrefix string) []string
Return all keys within a partition with the given keyPrefix
func GetPartitionsInfo ¶
func GetPartitionsInfo(db badgerwrap.DB) (map[string]*PartitionInfo, uint64)
Gets the Information for partitions to key Count Map Returns Partitions to KeyCount Map, Partitions TableName to Key Count and total key count
func GetSortedPartitionIDs ¶
func GetSortedPartitionIDs(partitionsInfoMap map[string]*PartitionInfo) []string
Returns the sorted list of partitionIDs from the given partitions Info map
func GetTotalKeyCount ¶
func GetTotalKeyCount(db badgerwrap.DB, keyPrefix string) uint64
returns the number of keys in DB with given prefix. If prefix is not provided it gives count of all keys
func PrintKeyHistogram ¶
func PrintKeyHistogram(db badgerwrap.DB)
prints all the keys histogram. It can help debugging when needed.
Types ¶
type PartitionInfo ¶
type SloopKey ¶
func GetSloopKey ¶
func GetSloopKey(item badgerwrap.Item) (SloopKey, error)
returns TableName, PartitionId, error.
Click to show internal directories.
Click to hide internal directories.