Class DistinctCountHLLValueAggregator

  • All Implemented Interfaces:
    ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>

    public class DistinctCountHLLValueAggregator
    extends Object
    implements ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
    • Constructor Detail

      • DistinctCountHLLValueAggregator

        public DistinctCountHLLValueAggregator()
    • Method Detail

      • getInitialAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLog getInitialAggregatedValue​(Object rawValue)
        Description copied from interface: ValueAggregator
        Returns the initial aggregated value.
        Specified by:
        getInitialAggregatedValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
      • applyRawValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLog applyRawValue​(com.clearspring.analytics.stream.cardinality.HyperLogLog value,
                                                                                      Object rawValue)
        Description copied from interface: ValueAggregator
        Applies a raw value to the current aggregated value.

        NOTE: if value is mutable, will directly modify the value.

        Specified by:
        applyRawValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
      • applyAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLog applyAggregatedValue​(com.clearspring.analytics.stream.cardinality.HyperLogLog value,
                                                                                             com.clearspring.analytics.stream.cardinality.HyperLogLog aggregatedValue)
        Description copied from interface: ValueAggregator
        Applies an aggregated value to the current aggregated value.

        NOTE: if value is mutable, will directly modify the value.

        Specified by:
        applyAggregatedValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
      • cloneAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLog cloneAggregatedValue​(com.clearspring.analytics.stream.cardinality.HyperLogLog value)
        Description copied from interface: ValueAggregator
        Clones an aggregated value.
        Specified by:
        cloneAggregatedValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
      • getMaxAggregatedValueByteSize

        public int getMaxAggregatedValueByteSize()
        Description copied from interface: ValueAggregator
        Returns the maximum size in bytes of the aggregated values seen so far.
        Specified by:
        getMaxAggregatedValueByteSize in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
      • serializeAggregatedValue

        public byte[] serializeAggregatedValue​(com.clearspring.analytics.stream.cardinality.HyperLogLog value)
        Description copied from interface: ValueAggregator
        Serializes an aggregated value into a byte array.
        Specified by:
        serializeAggregatedValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>
      • deserializeAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLog deserializeAggregatedValue​(byte[] bytes)
        Description copied from interface: ValueAggregator
        De-serializes an aggregated value from a byte array.
        Specified by:
        deserializeAggregatedValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLog>