java.lang.Object
org.elasticsearch.tdigest.parsing.TDigestParser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA parsed t-digest fieldstatic interfaceInterface for throwing a parsing exception, needed for visibility -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidensureExpectedToken(XContentParser.Token expected, XContentParser.Token actual, XContentParser parser, TDigestParser.ParsingExceptionProvider parsingExceptionProvider) static TDigestParser.ParsedTDigestparse(String mappedFieldName, XContentParser parser, BiFunction<XContentLocation, String, RuntimeException> documentParsingExceptionProvider, TDigestParser.ParsingExceptionProvider parsingExceptionProvider) Parses an XContent object into a histogram.
-
Field Details
-
CENTROIDS_NAME
- See Also:
-
COUNTS_NAME
- See Also:
-
SUM_FIELD_NAME
- See Also:
-
MIN_FIELD_NAME
- See Also:
-
MAX_FIELD_NAME
- See Also:
-
-
Constructor Details
-
TDigestParser
public TDigestParser()
-
-
Method Details
-
parse
public static TDigestParser.ParsedTDigest parse(String mappedFieldName, XContentParser parser, BiFunction<XContentLocation, String, throws IOExceptionRuntimeException> documentParsingExceptionProvider, TDigestParser.ParsingExceptionProvider parsingExceptionProvider) Parses an XContent object into a histogram. The parser is expected to point at the next token afterXContentParser.Token.START_OBJECT.- Parameters:
mappedFieldName- the name of the field being parsed, used for error messagesparser- the parser to usedocumentParsingExceptionProvider- factory function for generating document parsing exceptions. Required for visibility.- Returns:
- the parsed histogram
- Throws:
IOException
-
ensureExpectedToken
public static void ensureExpectedToken(XContentParser.Token expected, XContentParser.Token actual, XContentParser parser, TDigestParser.ParsingExceptionProvider parsingExceptionProvider) throws IOException - Throws:
IOException
-