Documentation
¶
Index ¶
- Constants
- func ClearPqs()
- func GetHashForAggs(a *structs.QueryAggregators) string
- func GetHashForQuery(n *structs.SearchNode) string
- func GetPQSById(ctx *fasthttp.RequestCtx)
- func GetPQSSummary(ctx *fasthttp.RequestCtx)
- func GetPersistentColumns(intable string, orgid uint64) (map[string]bool, error)
- func GetTopNPersistentSearches(intable string, orgid uint64) (map[string]*structs.SearchNode, error)
- func GetTopPersistentAggs(table string) ([]string, map[string]bool)
- func InitQT()
- func IsQueryPersistent(tableName []string, sn *structs.SearchNode) (bool, error)
- func PostPqsAggCols(ctx *fasthttp.RequestCtx)
- func PostPqsClear(ctx *fasthttp.RequestCtx)
- func RefreshExternalAggsInfo(fNames []string) error
- func RefreshExternalPQInfo(fNames []string) error
- func UpdateQTUsage(tableName []string, sn *structs.SearchNode, aggs *structs.QueryAggregators)
- type PersistentAggregation
- type PersistentGroupBy
- type PersistentInfo
- type PersistentSearchNode
Constants ¶
View Source
const FLUSH_SLEEP_SECS = 120
View Source
const MAX_CANDIDATE_QUERIES = 10_000 // this limits how many unique queries we use in our stats calculations
View Source
const MAX_NUM_GROUPBY_COLS = 10
View Source
const MAX_QUERIES_TO_TRACK = 100 // this limits how many PQS searches we are doing
View Source
const STALE_QUERIES_EXPIRY_SECS = 21600 // queries will get booted out if they have not been seen in 6 hours
View Source
const STALE_SLEEP_SECS = 1800
Variables ¶
This section is empty.
Functions ¶
func GetHashForAggs ¶
func GetHashForAggs(a *structs.QueryAggregators) string
func GetHashForQuery ¶
func GetHashForQuery(n *structs.SearchNode) string
ALGORITHM for creating a unique hash 1. In each struct maintain a hid (hashid), it is pre-determined way of creating hash out of of elements of that struct in the sequence they are defined in the go files 2. If a struct has sub-structs then we recursively call the hashid func 3. if the hid is already present then we use it else we calculate it for that data type 4. we keep doing recursive until we get base data types of go like int, bool, string, etc... 5. This is a pretty standard way of creating id borrowed from the java world
func GetPQSSummary ¶
func GetPQSSummary(ctx *fasthttp.RequestCtx)
func GetPersistentColumns ¶
func GetTopPersistentAggs ¶
returns a sorted slice of most used group by columns, and all measure columns.
func IsQueryPersistent ¶
func IsQueryPersistent(tableName []string, sn *structs.SearchNode) (bool, error)
func PostPqsAggCols ¶
func PostPqsAggCols(ctx *fasthttp.RequestCtx)
func PostPqsClear ¶
func PostPqsClear(ctx *fasthttp.RequestCtx)
func RefreshExternalAggsInfo ¶
func RefreshExternalPQInfo ¶
func UpdateQTUsage ¶
func UpdateQTUsage(tableName []string, sn *structs.SearchNode, aggs *structs.QueryAggregators)
Types ¶
type PersistentAggregation ¶
type PersistentAggregation struct { QueryAggs *structs.QueryAggregators PersistentInfo }
type PersistentGroupBy ¶
type PersistentInfo ¶
type PersistentSearchNode ¶
type PersistentSearchNode struct { SearchNode *structs.SearchNode PersistentInfo }
func GetQTUsageInfo ¶
func GetQTUsageInfo(tableName []string, sn *structs.SearchNode) (*PersistentSearchNode, error)
Click to show internal directories.
Click to hide internal directories.