com.netflix.atlas.core.index

Members list

Type members

Classlikes

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class BatchUpdateTagIndex[T <: TaggedItem](registry: Registry, newIndex: (Array[T]) => TagIndex[T])(implicit evidence$1: ClassTag[T]) extends MutableTagIndex[T]

Mutable tag index that batches updates and atomically swaps in a new index in the background at a configured interval.

Mutable tag index that batches updates and atomically swaps in a new index in the background at a configured interval.

Value parameters

newIndex

Function to create a new index from the set of items.

registry

Spectator registry to use for reporting metrics.

Attributes

Companion
object
Supertypes
trait MutableTagIndex[T]
trait TagIndex[T]
class Object
trait Matchable
class Any
class CachingTagIndex[T <: TaggedItem](delegate: TagIndex[T]) extends TagIndex[T]

Caches results of tag queries on the underlying index. It is assumed that the underlying index is immutable and expiration from the cache is only done based on size.

Caches results of tag queries on the underlying index. It is assumed that the underlying index is immutable and expiration from the cache is only done based on size.

Attributes

Supertypes
trait TagIndex[T]
class Object
trait Matchable
class Any
class IndexStats(registry: Registry)

Helper for reporting basic stats about the index. The three stats collected are:

Helper for reporting basic stats about the index. The three stats collected are:

  1. Number of key strings
  2. Number of value strings
  3. Number of items
  4. Number of metrics

The number of strings help to determine how close we are to the size of the string table used for interning. Items is mostly provided as a cross reference to get a rough idea of the impact for rolling up a given key. Since the overlap with other dimensions is not known, it will only be a rough estimate.

Value parameters

registry

Spectator registry to use for reporting the stats.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object IndexStats

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
IndexStats.type
trait MutableTagIndex[T <: TaggedItem] extends TagIndex[T]

Attributes

Supertypes
trait TagIndex[T]
class Object
trait Matchable
class Any
Known subtypes
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:

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
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object QueryIndex

Helper for building an index.

Helper for building an index.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
QueryIndex.type
class RoaringTagIndex[T <: TaggedItem](items: Array[T], stats: IndexStats) extends TagIndex[T]

Create a new index based on roaring bitmaps.

Create a new index based on roaring bitmaps.

https://github.com/RoaringBitmap/RoaringBitmap

Value parameters

items

Items to include in the index. The array must already be sorted by id and should not be used or modified outside of the index.

stats

Used to track stats related to the index.

Attributes

Companion
object
Supertypes
trait TagIndex[T]
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class SimpleTagIndex[T <: TaggedItem](items: Array[T])(implicit evidence$1: ClassTag[T]) extends TagIndex[T]

Attributes

Supertypes
trait TagIndex[T]
class Object
trait Matchable
class Any
trait TagIndex[T <: TaggedItem]

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class TagQuery(query: Option[Query], key: Option[String], offset: String, limit: Int)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Index for efficiently finding tagged items that match a query.

Index for efficiently finding tagged items that match a query.

Value parameters

all

Bit set representing all items in the index.

hasKeyIdx

Map from key to set of items that have that key in the tag set.

keyMap

Maps the key string to the numeric value used internally to other index data structures.

keyValueIdx

Map from key to value to bit set of items that have the key and value in their tag set.

tagPositions

Sorted array of all tags. The tags are stored as long values with the key as the most significant 32bits and the values as the least significant 32bits. Key is a position in the keys array, value is a position in the values array.

valueMap

Maps the value string to the numeric value used internally to other index data structures.

values

Sorted array of all strings used as tag values.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Types

type ValueIndex = IntRefHashMap[RoaringBitmap]