java.lang.Object
org.elasticsearch.compute.data.TDigestHolder
- All Implemented Interfaces:
GenericNamedWriteable,NamedWriteable,VersionedNamedWriteable,Writeable,org.elasticsearch.tdigest.TDigestReadView
public class TDigestHolder
extends Object
implements GenericNamedWriteable, org.elasticsearch.tdigest.TDigestReadView
This is a
This class supports serialization, but this is only intended for use in ES|QL Literals, as it uses untracked memory on deserialization.
TDigestReadView annotated with some extra information: The sum, min and max of all observations.
In addition, it stores the size as a dedicated field for faster access.
The TDigest is represented a list of centroids and their counts, encoded in a byte array.
This class does not own the underlying memory used to store the digest, it is merely a pointer/accessor for e.g.
a single value in a TDigestBlock or in BreakingTDigestHolder.
This class supports serialization, but this is only intended for use in ES|QL Literals, as it uses untracked memory on deserialization.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCollection<org.elasticsearch.tdigest.Centroid> static TDigestHolderempty()booleanorg.apache.lucene.util.BytesRefdoublegetMax()doublegetMin()doublegetSum()inthashCode()voidreset(org.apache.lucene.util.BytesRef encodedDigest, double min, double max, double sum, long valueCount) longsize()toString()voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.io.stream.VersionedNamedWriteable
supportsVersion
-
Field Details
-
ENTRY
-
-
Constructor Details
-
TDigestHolder
public TDigestHolder() -
TDigestHolder
- Throws:
IOException
-
-
Method Details
-
reset
public void reset(org.apache.lucene.util.BytesRef encodedDigest, double min, double max, double sum, long valueCount) -
empty
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
getEncodedDigest
public org.apache.lucene.util.BytesRef getEncodedDigest() -
getMax
public double getMax()- Specified by:
getMaxin interfaceorg.elasticsearch.tdigest.TDigestReadView
-
getMin
public double getMin()- Specified by:
getMinin interfaceorg.elasticsearch.tdigest.TDigestReadView
-
size
public long size()- Specified by:
sizein interfaceorg.elasticsearch.tdigest.TDigestReadView
-
centroids
- Specified by:
centroidsin interfaceorg.elasticsearch.tdigest.TDigestReadView
-
centroidCount
public int centroidCount()- Specified by:
centroidCountin interfaceorg.elasticsearch.tdigest.TDigestReadView
-
getSum
public double getSum() -
toString
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getMinimalSupportedVersion
- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-