Search in sources :

Example 1 with GroupDataSummary

use of com.yahoo.bullet.aggregations.grouping.GroupDataSummary in project bullet-core by yahoo.

the class TupleSketch method getRecords.

@Override
public List<BulletRecord> getRecords() {
    merge();
    List<BulletRecord> result = new ArrayList<>();
    SketchIterator<GroupDataSummary> iterator = this.result.iterator();
    for (int count = 0; iterator.next() && count < maxSize; count++) {
        GroupData data = iterator.getSummary().getData();
        result.add(data.getAsBulletRecord());
    }
    return result;
}
Also used : BulletRecord(com.yahoo.bullet.record.BulletRecord) ArrayList(java.util.ArrayList) GroupDataSummary(com.yahoo.bullet.aggregations.grouping.GroupDataSummary) GroupData(com.yahoo.bullet.aggregations.grouping.GroupData) CachingGroupData(com.yahoo.bullet.aggregations.grouping.CachingGroupData)

Example 2 with GroupDataSummary

use of com.yahoo.bullet.aggregations.grouping.GroupDataSummary in project bullet-core by yahoo.

the class TupleSketch method union.

@Override
public void union(byte[] serialized) {
    Sketch<GroupDataSummary> deserialized = Sketches.heapifySketch(new NativeMemory(serialized));
    unionSketch.update(deserialized);
    super.union();
}
Also used : NativeMemory(com.yahoo.memory.NativeMemory) GroupDataSummary(com.yahoo.bullet.aggregations.grouping.GroupDataSummary)

Aggregations

GroupDataSummary (com.yahoo.bullet.aggregations.grouping.GroupDataSummary)2 CachingGroupData (com.yahoo.bullet.aggregations.grouping.CachingGroupData)1 GroupData (com.yahoo.bullet.aggregations.grouping.GroupData)1 BulletRecord (com.yahoo.bullet.record.BulletRecord)1 NativeMemory (com.yahoo.memory.NativeMemory)1 ArrayList (java.util.ArrayList)1