public class ThetaSketchingStrategy extends SketchingStrategy<S>
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_NOMINAL_ENTRIES |
static String |
DEFAULT_UPDATE_SKETCH_FAMILY |
fields, metadataKeys, separator, sketch
Constructor and Description |
---|
ThetaSketchingStrategy(CountDistinct aggregation,
BulletConfig config)
Constructor that requires an
Aggregation and a BulletConfig configuration. |
Modifier and Type | Method and Description |
---|---|
void |
consume(com.yahoo.bullet.record.BulletRecord data)
Consumes a single
BulletRecord into this Monoid. |
List<com.yahoo.bullet.record.BulletRecord> |
getRecords()
Get the data so far as a
List of BulletRecord . |
static com.yahoo.sketches.ResizeFactor |
getResizeFactor(int factor)
Converts a integer representing the resizing for Sketches into a
ResizeFactor . |
Clip |
getResult()
Get the data so far as a
Clip . |
combine, getData, getMetadata, reset
public static final String DEFAULT_UPDATE_SKETCH_FAMILY
public static final int DEFAULT_NOMINAL_ENTRIES
public ThetaSketchingStrategy(CountDistinct aggregation, BulletConfig config)
Aggregation
and a BulletConfig
configuration.aggregation
- An Aggregation
with valid fields and attributes for this aggregation type.config
- The config that has relevant configs for this strategy.public void consume(com.yahoo.bullet.record.BulletRecord data)
Monoidal
BulletRecord
into this Monoid.data
- The BulletRecord
to consume.public Clip getResult()
Monoidal
Clip
.getResult
in interface Monoidal
getResult
in class SketchingStrategy<ThetaSketch>
Clip
representing the data and the metadata so far.public List<com.yahoo.bullet.record.BulletRecord> getRecords()
Monoidal
List
of BulletRecord
.getRecords
in interface Monoidal
getRecords
in class SketchingStrategy<ThetaSketch>
public static com.yahoo.sketches.ResizeFactor getResizeFactor(int factor)
ResizeFactor
.factor
- An int representing the scaling when the Sketch reaches its threshold. Supports 1, 2, 4 and 8.ResizeFactor
represented by the integer or ResizeFactor.X8
otherwise.Copyright © 2021. All rights reserved.