QueryIndex

com.netflix.atlas.core.index.QueryIndex
See theQueryIndex companion object
case class QueryIndex[T](indexes: SmallHashMap[Equal, QueryIndex[T]], entries: Array[Entry[T]])

Index for quickly matching a set of tags against many query expressions. The intended use-case is for stream processing. If a stream of tagged data points are flowing through the system and we have thousands of queries, then we need efficient ways to:

  1. Check if a datapoint is a match to any of the queries. This can be used to quickly filter out data that isn't going to be needed.
  2. Figure out which queries or expressions match a given datapoint.

Value parameters

entries

Entries that remain after checking all the simple :eq queries. This list will be searched using a linear scan to get final matching with regex or other more complicated query clauses.

indexes

Map of :eq query to a sub-index. This is used to recursively search the set after finding the first match.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def matches(tags: Map[String, String]): Boolean

Returns true if the tags match any of the queries in the index.

Returns true if the tags match any of the queries in the index.

Attributes

def matchingEntries(tags: Map[String, String]): List[T]

Finds the set of items that match the provided tags.

Finds the set of items that match the provided tags.

Attributes

override def toString: String

Creates a string representation of the index tree. Warning: this can be large if many queries are indexed.

Creates a string representation of the index tree. Warning: this can be large if many queries are indexed.

Attributes

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product