Class DistinctCountHLLPlusValueAggregator

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

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

      • DistinctCountHLLPlusValueAggregator

        public DistinctCountHLLPlusValueAggregator​(List<ExpressionContext> arguments)
    • Method Detail

      • getInitialAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLogPlus 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.HyperLogLogPlus>
      • applyRawValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLogPlus applyRawValue​(com.clearspring.analytics.stream.cardinality.HyperLogLogPlus 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.HyperLogLogPlus>
      • applyAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLogPlus applyAggregatedValue​(com.clearspring.analytics.stream.cardinality.HyperLogLogPlus value,
                                                                                                 com.clearspring.analytics.stream.cardinality.HyperLogLogPlus 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.HyperLogLogPlus>
      • cloneAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLogPlus cloneAggregatedValue​(com.clearspring.analytics.stream.cardinality.HyperLogLogPlus value)
        Description copied from interface: ValueAggregator
        Clones an aggregated value.
        Specified by:
        cloneAggregatedValue in interface ValueAggregator<Object,​com.clearspring.analytics.stream.cardinality.HyperLogLogPlus>
      • 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.HyperLogLogPlus>
      • serializeAggregatedValue

        public byte[] serializeAggregatedValue​(com.clearspring.analytics.stream.cardinality.HyperLogLogPlus 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.HyperLogLogPlus>
      • deserializeAggregatedValue

        public com.clearspring.analytics.stream.cardinality.HyperLogLogPlus 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.HyperLogLogPlus>