Package org.apache.druid.hll
Class VersionOneHyperLogLogCollector
java.lang.Object
org.apache.druid.hll.HyperLogLogCollector
org.apache.druid.hll.VersionOneHyperLogLogCollector
- All Implemented Interfaces:
Comparable<HyperLogLogCollector>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final byteHeader: Byte 0: version Byte 1: registerOffset Byte 2-3: numNonZeroRegisters Byte 4: maxOverflowValue Byte 5-6: maxOverflowRegisterFields inherited from class org.apache.druid.hll.HyperLogLogCollector
BITS_FOR_BUCKETS, CORRECTION_PARAMETER, DENSE_THRESHOLD, HIGH_CORRECTION_THRESHOLD, LOW_CORRECTION_THRESHOLD, NUM_BUCKETS, NUM_BYTES_FOR_BUCKETS -
Method Summary
Modifier and TypeMethodDescriptionshortbyteintintshortintintgetPayloadBytePosition(ByteBuffer buffer) bytebytevoidsetMaxOverflowRegister(short register) voidsetMaxOverflowRegister(ByteBuffer buffer, short register) voidsetMaxOverflowValue(byte value) voidsetMaxOverflowValue(ByteBuffer buffer, byte value) voidsetNumNonZeroRegisters(short numNonZeroRegisters) voidsetNumNonZeroRegisters(ByteBuffer buffer, short numNonZeroRegisters) voidsetRegisterOffset(byte registerOffset) voidsetRegisterOffset(ByteBuffer buffer, byte registerOffset) voidsetVersion(ByteBuffer buffer) Methods inherited from class org.apache.druid.hll.HyperLogLogCollector
add, add, applyCorrection, compareTo, equals, estimateByteBuffer, estimateCardinality, estimateCardinalityRound, fold, fold, getInitPosition, getLatestNumBytesForDenseStorage, getStorageBuffer, hashCode, makeCollector, makeCollectorSharingStorage, makeEmptyVersionedByteArray, makeLatestCollector, toByteArray, toByteBuffer, toString
-
Field Details
-
VERSION
public static final byte VERSIONHeader: Byte 0: version Byte 1: registerOffset Byte 2-3: numNonZeroRegisters Byte 4: maxOverflowValue Byte 5-6: maxOverflowRegister- See Also:
-
REGISTER_OFFSET_BYTE
public static final int REGISTER_OFFSET_BYTE- See Also:
-
NUM_NON_ZERO_REGISTERS_BYTE
public static final int NUM_NON_ZERO_REGISTERS_BYTE- See Also:
-
MAX_OVERFLOW_VALUE_BYTE
public static final int MAX_OVERFLOW_VALUE_BYTE- See Also:
-
MAX_OVERFLOW_REGISTER_BYTE
public static final int MAX_OVERFLOW_REGISTER_BYTE- See Also:
-
HEADER_NUM_BYTES
public static final int HEADER_NUM_BYTES- See Also:
-
NUM_BYTES_FOR_DENSE_STORAGE
public static final int NUM_BYTES_FOR_DENSE_STORAGE- See Also:
-
-
Method Details
-
getVersion
public byte getVersion()- Specified by:
getVersionin classHyperLogLogCollector
-
setVersion
- Specified by:
setVersionin classHyperLogLogCollector
-
getRegisterOffset
public byte getRegisterOffset()- Specified by:
getRegisterOffsetin classHyperLogLogCollector
-
setRegisterOffset
public void setRegisterOffset(byte registerOffset) - Specified by:
setRegisterOffsetin classHyperLogLogCollector
-
setRegisterOffset
- Specified by:
setRegisterOffsetin classHyperLogLogCollector
-
getNumNonZeroRegisters
public short getNumNonZeroRegisters()- Specified by:
getNumNonZeroRegistersin classHyperLogLogCollector
-
setNumNonZeroRegisters
public void setNumNonZeroRegisters(short numNonZeroRegisters) - Specified by:
setNumNonZeroRegistersin classHyperLogLogCollector
-
setNumNonZeroRegisters
- Specified by:
setNumNonZeroRegistersin classHyperLogLogCollector
-
getMaxOverflowValue
public byte getMaxOverflowValue()- Specified by:
getMaxOverflowValuein classHyperLogLogCollector
-
setMaxOverflowValue
public void setMaxOverflowValue(byte value) - Specified by:
setMaxOverflowValuein classHyperLogLogCollector
-
setMaxOverflowValue
- Specified by:
setMaxOverflowValuein classHyperLogLogCollector
-
getMaxOverflowRegister
public short getMaxOverflowRegister()- Specified by:
getMaxOverflowRegisterin classHyperLogLogCollector
-
setMaxOverflowRegister
public void setMaxOverflowRegister(short register) - Specified by:
setMaxOverflowRegisterin classHyperLogLogCollector
-
setMaxOverflowRegister
- Specified by:
setMaxOverflowRegisterin classHyperLogLogCollector
-
getNumHeaderBytes
public int getNumHeaderBytes()- Specified by:
getNumHeaderBytesin classHyperLogLogCollector
-
getNumBytesForDenseStorage
public int getNumBytesForDenseStorage()- Specified by:
getNumBytesForDenseStoragein classHyperLogLogCollector
-
getPayloadBytePosition
public int getPayloadBytePosition()- Specified by:
getPayloadBytePositionin classHyperLogLogCollector
-
getPayloadBytePosition
- Specified by:
getPayloadBytePositionin classHyperLogLogCollector
-