The following is a list of metric makers that are built-in to Fili. See Configuring Metrics for details on metric makers.
These makers are used to make first-level metrics, and are in a one-to-one mapping to the Druid aggregations.
Additionally, the Fili core libraries support Sketch datatypes and sketch set operations provided by theta sketches in Druid.
SketchCountMaker- The sketchCount is associated with the sketch aggregation
More details about sketches can be found at http://datasketches.github.io/.
The following makers apply single Druid post-aggregators to queries. They correspond to the Druid post-aggregations
Sketch set operations are supported as well.
SketchSetOperationMaker- Part of the Druid sketch module
We currently support neither the native Druid
HyperUnique Cardinality post aggregators. Fili
supports sketches rather than hyperUnique objects, which handle the same problem domain.
are not considered production-safe in terms of performance or server load.
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:
AggregationAverageMakerallows 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
AggregationAverageMakeris rather complex, and has its own document that explains how
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.