Class DataDescription
java.lang.Object
org.elasticsearch.client.ml.job.config.DataDescription
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public class DataDescription
extends Object
implements org.elasticsearch.common.xcontent.ToXContentObject
Describes the format of the data used in the job and how it should
be interpreted by the ML job.
getTimeField()
is the name of the field containing the timestamp and
getTimeFormat()
is the format code for the date string in as described by
DateTimeFormatter
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Enum of the acceptable data formats.Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
-
Field Summary
Modifier and TypeFieldDescriptionstatic String
By default autodetect expects the timestamp in a field with this namestatic String
Special time format string for epoch times (seconds)static String
Special time format string for epoch times (milli-seconds)static org.elasticsearch.common.xcontent.ObjectParser<DataDescription.Builder,Void>
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Overridden equality testThe format of the data to be processed.The name of the field containing the timestampEither "epoch", "epoch_ms" or a SimpleDateTime format string.int
hashCode()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
EPOCH
Special time format string for epoch times (seconds)- See Also:
- Constant Field Values
-
EPOCH_MS
Special time format string for epoch times (milli-seconds)- See Also:
- Constant Field Values
-
DEFAULT_TIME_FIELD
By default autodetect expects the timestamp in a field with this name- See Also:
- Constant Field Values
-
PARSER
public static final org.elasticsearch.common.xcontent.ObjectParser<DataDescription.Builder,Void> PARSER
-
-
Constructor Details
-
DataDescription
-
-
Method Details
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-
getFormat
The format of the data to be processed. AlwaysDataDescription.DataFormat.XCONTENT
- Returns:
- The data format
-
getTimeField
The name of the field containing the timestamp- Returns:
- A String if set or
null
-
getTimeFormat
Either "epoch", "epoch_ms" or a SimpleDateTime format string. If not set (isnull
or an empty string) or set to "epoch_ms" (the default) then the date is assumed to be in milliseconds from the epoch.- Returns:
- A String if set or
null
-
equals
Overridden equality test -
hashCode
public int hashCode()
-