S - A Sketch type.public abstract class SketchingStrategy<S extends Sketch> extends Object implements Strategy
Strategy that use Sketches.| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
fields |
protected Map<String,String> |
metadataKeys |
protected String |
separator |
protected S |
sketch |
| Constructor and Description |
|---|
SketchingStrategy(Aggregation aggregation,
BulletConfig config)
The constructor for creating a Sketch based strategy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
combine(byte[] data)
Combines a serialized piece of data into this Monoid.
|
byte[] |
getData()
Get the data serialized as a byte[].
|
Meta |
getMetadata()
Get the
Meta so far. |
List<com.yahoo.bullet.record.BulletRecord> |
getRecords()
Get the data so far as a
List of BulletRecord. |
Clip |
getResult()
Get the data so far as a
Clip. |
void |
reset()
Reset the data so far and make this the identity element for the Monoid with respect to inserting data.
|
protected final String separator
public SketchingStrategy(Aggregation aggregation, BulletConfig config)
aggregation - An Aggregation with valid fields and attributes for this aggregation type.config - The config that has relevant configs for this sketch based strategy.public void combine(byte[] data)
Monoidalcombine in interface Monoidaldata - A serialized representation of the data produced by Monoidal.getData().public byte[] getData()
Monoidalpublic Clip getResult()
MonoidalClip.public List<com.yahoo.bullet.record.BulletRecord> getRecords()
MonoidalList of BulletRecord.getRecords in interface Monoidalpublic Meta getMetadata()
StrategyMeta so far. By default, returns an empty one.getMetadata in interface MonoidalgetMetadata in interface StrategyCopyright © 2021. All rights reserved.