public class GroupedTypedHistogram extends Object implements TypedHistogram
eg, heads[100] -> 3 means the first piece of data is (values[valuePositions[3]], counts[3]) If next[3] is 10, then we look at (values[valuePositions[10]], counts[10]) and so on to construct the value, count pairs needed. An iterator-style function, readAllValues, exists and the caller may do whatever want with the values.
| Constructor and Description |
|---|
GroupedTypedHistogram(long groupId,
Block block,
Type type,
int bucketId)
TODO: use RowBlock in the future
|
GroupedTypedHistogram(Type type,
int expectedCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int position,
Block block,
long count) |
void |
addAll(TypedHistogram other) |
void |
ensureCapacity(long size) |
long |
getEstimatedSize() |
int |
getExpectedSize() |
Type |
getType() |
boolean |
isEmpty() |
void |
readAllValues(HistogramValueReader reader) |
void |
serialize(BlockBuilder out) |
TypedHistogram |
setGroupId(long groupId) |
public GroupedTypedHistogram(Type type, int expectedCount)
public void ensureCapacity(long size)
ensureCapacity in interface TypedHistogrampublic long getEstimatedSize()
getEstimatedSize in interface TypedHistogrampublic void serialize(BlockBuilder out)
serialize in interface TypedHistogrampublic void addAll(TypedHistogram other)
addAll in interface TypedHistogrampublic void readAllValues(HistogramValueReader reader)
readAllValues in interface TypedHistogrampublic TypedHistogram setGroupId(long groupId)
setGroupId in interface TypedHistogrampublic Type getType()
getType in interface TypedHistogrampublic int getExpectedSize()
getExpectedSize in interface TypedHistogrampublic boolean isEmpty()
isEmpty in interface TypedHistogrampublic void add(int position,
Block block,
long count)
add in interface TypedHistogramCopyright © 2012–2019. All rights reserved.