Class

com.netflix.atlas.core.model.MathExpr

NamedRewrite

Related Doc: package MathExpr

Permalink

case class NamedRewrite(name: String, displayExpr: Expr, evalExpr: TimeSeriesExpr, context: Context, groupByRewrite: Option[(Expr, List[String]) ⇒ Expr] = None) extends TimeSeriesExpr with Product with Serializable

Named rewrites are used to keep track of the user intent for operations and macros that are defined in terms of other basic operations. For example, :avg is not available as a basic aggregate type, it is a rewrite to query,:sum,query,:count,:div. However, for the user it is better if we can show query,:avg when dumping the expression as a string.

name

Name of the operation, e.g., avg.

displayExpr

Expression that is displayed to the user when creating the expression string.

evalExpr

Expression that is evaluated.

context

Evaluation context for the initial creation time. This context is used to re-evaluate the rewrite using the original context if the overall expression is rewritten (Expr.rewrite()) later.

Linear Supertypes
Serializable, Serializable, TimeSeriesExpr, Expr, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NamedRewrite
  2. Serializable
  3. Serializable
  4. TimeSeriesExpr
  5. Expr
  6. Product
  7. Equals
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NamedRewrite(name: String, displayExpr: Expr, evalExpr: TimeSeriesExpr, context: Context, groupByRewrite: Option[(Expr, List[String]) ⇒ Expr] = None)

    Permalink

    name

    Name of the operation, e.g., avg.

    displayExpr

    Expression that is displayed to the user when creating the expression string.

    evalExpr

    Expression that is evaluated.

    context

    Evaluation context for the initial creation time. This context is used to re-evaluate the rewrite using the original context if the overall expression is rewritten (Expr.rewrite()) later.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. val context: Context

    Permalink

    Evaluation context for the initial creation time.

    Evaluation context for the initial creation time. This context is used to re-evaluate the rewrite using the original context if the overall expression is rewritten (Expr.rewrite()) later.

  7. def dataExprs: List[DataExpr]

    Permalink

    The underlying data expressions that supply input for the evaluation.

    The underlying data expressions that supply input for the evaluation. These are used to fetch data from the data stores. There may be some expressions types that generate data and will have an empty set. Examples are constants, random, or time.

    Definition Classes
    NamedRewriteTimeSeriesExpr
  8. val displayExpr: Expr

    Permalink

    Expression that is displayed to the user when creating the expression string.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def eval(context: EvalContext, data: Map[DataExpr, List[TimeSeries]]): ResultSet

    Permalink
    Definition Classes
    NamedRewriteTimeSeriesExpr
  11. def eval(context: EvalContext, data: List[TimeSeries]): ResultSet

    Permalink
    Definition Classes
    TimeSeriesExpr
  12. val evalExpr: TimeSeriesExpr

    Permalink

    Expression that is evaluated.

  13. def exprString: String

    Permalink

    Returns a string that can be executed with the stack interpreter to create this expression.

    Returns a string that can be executed with the stack interpreter to create this expression.

    Definition Classes
    Expr
  14. def finalGrouping: List[String]

    Permalink

    Returns the final grouping for the expression.

    Returns the final grouping for the expression. For non-grouped expressions this will be an empty list. If a multi-level group by is used, then this will return the grouping of the final result and ignore any intermediate groupings.

    Definition Classes
    NamedRewriteTimeSeriesExpr
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def groupBy(keys: List[String]): NamedRewrite

    Permalink
  17. def groupByKey(tags: Map[String, String]): Option[String]

    Permalink

    Returns the grouping key generated for a given tag map.

    Returns the grouping key generated for a given tag map. All keys for the group by must be present in the map.

    Definition Classes
    NamedRewriteTimeSeriesExpr
  18. val groupByRewrite: Option[(Expr, List[String]) ⇒ Expr]

    Permalink
  19. def isGrouped: Boolean

    Permalink

    Returns true if the result is grouped.

    Returns true if the result is grouped. See GroupBy operators.

    Definition Classes
    NamedRewriteTimeSeriesExpr
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. val name: String

    Permalink

    Name of the operation, e.g., avg.

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  25. def rewrite(f: PartialFunction[Expr, Expr]): Expr

    Permalink

    Rewrite the expression using the specified function.

    Rewrite the expression using the specified function. The default implementation will try to recursively apply the rewrite to case classes.

    Definition Classes
    NamedRewriteExpr
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

    Permalink
    Definition Classes
    NamedRewrite → AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def withOffset(d: Duration): TimeSeriesExpr

    Permalink

    Apply a time shift to all underlying data expressions.

    Apply a time shift to all underlying data expressions.

    Definition Classes
    NamedRewriteTimeSeriesExpr

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from TimeSeriesExpr

Inherited from Expr

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped