Built In Makers

The following is a list of metric makers that are built-in to Fili. See Configuring Metrics for details on metric makers.

Makers for Druid Aggregation Operations

These makers are used to make first-level metrics, and are in a one-to-one mapping to the Druid aggregations.

  1. LongSumMaker
  2. DoubleSumMaker
  3. LongMaxMaker
  4. DoubleMaxMaker
  5. LongMinMaker
  6. DoubleMinMaker
  7. CountMaker1

Additionally, the Fili core libraries support Sketch datatypes and sketch set operations provided by theta sketches in Druid.

  1. SketchCountMaker - The sketchCount is associated with the sketch aggregation

More details about sketches can be found at http://datasketches.github.io/.

Makers for Druid Post-Aggregation Operations

The following makers apply single Druid post-aggregators to queries. They correspond to the Druid post-aggregations

  1. ArithmeticMaker
  2. ConstantMaker

Sketch set operations are supported as well.

  1. SketchSetOperationMaker - Part of the Druid sketch module

We currently support neither the native Druid JavaScript nor the HyperUnique Cardinality post aggregators. Fili supports sketches rather than hyperUnique objects, which handle the same problem domain. JavaScript post-aggregators are not considered production-safe in terms of performance or server load.

Makers for Constructed Operations

These makers represent more complex operations which do not correspond directly to a single Druid aggregation or post-aggregation. They might create additional columns, constrain the grain of a druid query, or be a shorthand for an arithmetic expression across aggregations (such as an average).

Currently, we only have one built-in metric maker of this type:

  1. AggregationAverageMaker: The AggregationAverageMaker allows us to aggregate a metric at one granularity, and then take the average of the aggregated metric across a coarser granularity. For example, suppose we want to compute the daily average page views for each month of the year 2012. In other words, for each month we first compute the total number of page views for every day of the month. Then, we take the average of those totals, giving us the daily average page views for that month. The AggregationAverageMaker is rather complex, and has its own document that explains how AggregationAverageMaker works.

1: Technically, CountMaker does not translate directly to the Druid count aggregation, because of a bug that existed in Druid when CountMaker was first implemented. Instead, CountMaker creates a nested query. The inner query adds a constant field with a value of 1 to each result row. The outer query then performs a longSum on said constant.