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)
Monoidal
combine
in interface Monoidal
data
- A serialized representation of the data produced by Monoidal.getData()
.public byte[] getData()
Monoidal
public Clip getResult()
Monoidal
Clip
.public List<com.yahoo.bullet.record.BulletRecord> getRecords()
Monoidal
List
of BulletRecord
.getRecords
in interface Monoidal
public Meta getMetadata()
Strategy
Meta
so far. By default, returns an empty one.getMetadata
in interface Monoidal
getMetadata
in interface Strategy
Copyright © 2021. All rights reserved.