Documentation ¶
Index ¶
- func BuildObjectKey(tableName, uploader, dbName string) string
- func CompressFile(src, dest string) error
- func DoParallelQueries(ctx context.Context, tableQuerier TableQuerier, queries []chunk.IndexQuery, ...) error
- func GetDBNameFromObjectKey(objectKey string) (string, error)
- func GetFileFromStorage(ctx context.Context, storageClient StorageClient, ...) error
- func IsDirectory(key string) bool
- func QueriesByTable(queries []chunk.IndexQuery) map[string][]chunk.IndexQuery
- func RemoveDirectories(incoming []chunk.StorageObject) []chunk.StorageObject
- func SafeOpenBoltdbFile(path string) (*bbolt.DB, error)
- func ValidateSharedStoreKeyPrefix(prefix string) error
- type IndexDeduper
- type StorageClient
- type TableQuerier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildObjectKey ¶
func CompressFile ¶
func DoParallelQueries ¶
func DoParallelQueries(ctx context.Context, tableQuerier TableQuerier, queries []chunk.IndexQuery, callback chunk_util.Callback) error
func GetDBNameFromObjectKey ¶
func GetFileFromStorage ¶
func GetFileFromStorage(ctx context.Context, storageClient StorageClient, objectKey, destination string) error
GetFileFromStorage downloads a file from storage to given location.
func IsDirectory ¶
IsDirectory will return true if the string ends in a forward slash
func QueriesByTable ¶
func QueriesByTable(queries []chunk.IndexQuery) map[string][]chunk.IndexQuery
QueriesByTable groups and returns queries by tables.
func RemoveDirectories ¶
func RemoveDirectories(incoming []chunk.StorageObject) []chunk.StorageObject
RemoveDirectories will return a new slice with any StorageObjects identified as directories removed.
func SafeOpenBoltdbFile ¶
SafeOpenBoltdbFile will recover from a panic opening a DB file, and return the panic message in the err return object.
Types ¶
type IndexDeduper ¶
type IndexDeduper struct {
// contains filtered or unexported fields
}
IndexDeduper should always be used on table level not the whole query level because it just looks at range values which can be repeated across tables Cortex anyways dedupes entries across tables
func NewIndexDeduper ¶
func NewIndexDeduper(callback chunk_util.Callback) *IndexDeduper
func (*IndexDeduper) Callback ¶
func (i *IndexDeduper) Callback(query chunk.IndexQuery, batch chunk.ReadBatch) bool
type StorageClient ¶
type TableQuerier ¶
type TableQuerier interface {
MultiQueries(ctx context.Context, queries []chunk.IndexQuery, callback chunk_util.Callback) error
}
Click to show internal directories.
Click to hide internal directories.