java.lang.Object
org.elasticsearch.xpack.core.ml.job.config.Job
- All Implemented Interfaces:
Diffable<Job>,SimpleDiffable<Job>,Writeable,ToXContent,ToXContentObject
This class represents a configured and created Job. The creation time is set
to the time the object was constructed and the finished time and last
data time fields are
null until the job has seen some data or it is
finished respectively.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final Stringstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final longstatic final longstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ObjectParser<Job.Builder, Void> static final TimeValuestatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ByteSizeValueThis includes the overhead of thread stacks and data structures that the program might use that are not instrumented.static final ParseFieldstatic final ObjectParser<Job.Builder, Void> static final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final StringFields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet all input data fields mentioned in the job configuration, namely analysis fields and the time field.booleanstatic StringdocumentId(String jobId) Get the persisted job document name from the Job Id.doXContentBody(XContentBuilder builder, ToXContent.Params params) longearliestValidTimestamp(DataCounts dataCounts) Returns the timestamp before which data is not accepted by the job.booleanstatic StringextractJobIdFromDocumentId(String docId) Returns the job id from the doc id.The analysis configuration objectThe analysis options objectThe background persistence intervalgetCompatibleJobTypes(MlConfigVersion mlConfigVersion) Returns the job types that are compatible with a node withmlConfigVersionThe Job creation time.If not set the input data is assumed to be csv with a '_time' field in epoch format.The job descriptionThe time the job was finished ornullif not finished.getId()Return the Job Id.A good starting name for the index storing the job's results.The duration of the renormalization window in daysinthashCode()booleanbooleanfinal StringtoString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
TYPE
- See Also:
-
ANOMALY_DETECTOR_JOB_TYPE
- See Also:
-
ID
-
JOB_TYPE
-
JOB_VERSION
-
GROUPS
-
ANALYSIS_CONFIG
-
ANALYSIS_LIMITS
-
CREATE_TIME
-
CUSTOM_SETTINGS
-
DATA_DESCRIPTION
-
DESCRIPTION
-
FINISHED_TIME
-
MODEL_PLOT_CONFIG
-
RENORMALIZATION_WINDOW_DAYS
-
BACKGROUND_PERSIST_INTERVAL
-
MODEL_SNAPSHOT_RETENTION_DAYS
-
DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS
-
RESULTS_RETENTION_DAYS
-
MODEL_SNAPSHOT_ID
-
MODEL_SNAPSHOT_MIN_VERSION
-
RESULTS_INDEX_NAME
-
DELETING
-
ALLOW_LAZY_OPEN
-
BLOCKED
-
DATAFEED_CONFIG
-
RESULTS_FIELD
-
LENIENT_PARSER
-
REST_REQUEST_PARSER
-
MIN_BACKGROUND_PERSIST_INTERVAL
-
PROCESS_MEMORY_OVERHEAD
This includes the overhead of thread stacks and data structures that the program might use that are not instrumented. (For theautodetectprocess categorization is not instrumented, and thenormalizeprocess is not instrumented at all.) But this overhead does NOT include the memory used by loading the executable code. -
DEFAULT_MODEL_SNAPSHOT_RETENTION_DAYS
public static final long DEFAULT_MODEL_SNAPSHOT_RETENTION_DAYS- See Also:
-
DEFAULT_DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS
public static final long DEFAULT_DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS- See Also:
-
-
Constructor Details
-
Job
- Throws:
IOException
-
-
Method Details
-
documentId
Get the persisted job document name from the Job Id. Throws ifjobIdis not a valid job Id.- Parameters:
jobId- The job id- Returns:
- The id of document the job is persisted in
-
extractJobIdFromDocumentId
Returns the job id from the doc id. Returnsnullif the doc id is invalid. -
getId
Return the Job Id.- Returns:
- The job Id string
-
getJobType
-
getJobVersion
-
getGroups
-
getInitialResultsIndexName
A good starting name for the index storing the job's results. This defaults to the shared results index if a specific index name is not set. This method must only be used during initial job creation. After that the read/write aliases must always be used to access the job's results index, as the underlying index may roll or be reindexed.- Returns:
- The job's initial results index name
-
getDescription
The job description- Returns:
- job description
-
getCreateTime
The Job creation time. This name is preferred when serialising to the REST API.- Returns:
- The date the job was created
-
getFinishedTime
The time the job was finished ornullif not finished.- Returns:
- The date the job was last retired or
null
-
getAnalysisConfig
The analysis configuration object- Returns:
- The AnalysisConfig
-
getAnalysisLimits
The analysis options object- Returns:
- The AnalysisLimits
-
getModelPlotConfig
-
getDataDescription
If not set the input data is assumed to be csv with a '_time' field in epoch format.- Returns:
- A DataDescription or
null - See Also:
-
getRenormalizationWindowDays
The duration of the renormalization window in days- Returns:
- renormalization window in days
-
getBackgroundPersistInterval
The background persistence interval- Returns:
- background persistence interval
-
getModelSnapshotRetentionDays
-
getDailyModelSnapshotRetentionAfterDays
-
getResultsRetentionDays
-
getCustomSettings
-
getModelSnapshotId
-
getModelSnapshotMinVersion
-
isDeleting
public boolean isDeleting() -
isResetting
public boolean isResetting() -
allowLazyOpen
public boolean allowLazyOpen() -
getBlocked
-
allInputFields
Get all input data fields mentioned in the job configuration, namely analysis fields and the time field.- Returns:
- the collection of fields - never
null
-
earliestValidTimestamp
Returns the timestamp before which data is not accepted by the job. This is the latest record timestamp minus the job latency.- Parameters:
dataCounts- the job data counts- Returns:
- the timestamp before which data is not accepted by the job
-
getDatafeedConfig
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
doXContentBody
public XContentBuilder doXContentBody(XContentBuilder builder, ToXContent.Params params) throws IOException - Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
getCompatibleJobTypes
Returns the job types that are compatible with a node withmlConfigVersion- Parameters:
mlConfigVersion- the version ML configuration in use- Returns:
- the compatible job types
-