java.lang.Object
org.elasticsearch.xpack.core.ml.job.config.Job
- All Implemented Interfaces:
Diffable<Job>,SimpleDiffable<Job>,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class Job
extends Object
implements SimpleDiffable<Job>, Writeable, org.elasticsearch.xcontent.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
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.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 org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final Stringstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final longstatic final longstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ObjectParser<Job.Builder, Void> static final org.elasticsearch.core.TimeValuestatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final ByteSizeValueThis includes the overhead of thread stacks and data structures that the program might use that are not instrumented.static final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ObjectParser<Job.Builder, Void> static final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.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.org.elasticsearch.xcontent.XContentBuilderdoXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.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 objectorg.elasticsearch.core.TimeValueThe 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()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.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
public static final org.elasticsearch.xcontent.ParseField ID -
JOB_TYPE
public static final org.elasticsearch.xcontent.ParseField JOB_TYPE -
JOB_VERSION
public static final org.elasticsearch.xcontent.ParseField JOB_VERSION -
GROUPS
public static final org.elasticsearch.xcontent.ParseField GROUPS -
ANALYSIS_CONFIG
public static final org.elasticsearch.xcontent.ParseField ANALYSIS_CONFIG -
ANALYSIS_LIMITS
public static final org.elasticsearch.xcontent.ParseField ANALYSIS_LIMITS -
CREATE_TIME
public static final org.elasticsearch.xcontent.ParseField CREATE_TIME -
CUSTOM_SETTINGS
public static final org.elasticsearch.xcontent.ParseField CUSTOM_SETTINGS -
DATA_DESCRIPTION
public static final org.elasticsearch.xcontent.ParseField DATA_DESCRIPTION -
DESCRIPTION
public static final org.elasticsearch.xcontent.ParseField DESCRIPTION -
FINISHED_TIME
public static final org.elasticsearch.xcontent.ParseField FINISHED_TIME -
MODEL_PLOT_CONFIG
public static final org.elasticsearch.xcontent.ParseField MODEL_PLOT_CONFIG -
RENORMALIZATION_WINDOW_DAYS
public static final org.elasticsearch.xcontent.ParseField RENORMALIZATION_WINDOW_DAYS -
BACKGROUND_PERSIST_INTERVAL
public static final org.elasticsearch.xcontent.ParseField BACKGROUND_PERSIST_INTERVAL -
MODEL_SNAPSHOT_RETENTION_DAYS
public static final org.elasticsearch.xcontent.ParseField MODEL_SNAPSHOT_RETENTION_DAYS -
DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS
public static final org.elasticsearch.xcontent.ParseField DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS -
RESULTS_RETENTION_DAYS
public static final org.elasticsearch.xcontent.ParseField RESULTS_RETENTION_DAYS -
MODEL_SNAPSHOT_ID
public static final org.elasticsearch.xcontent.ParseField MODEL_SNAPSHOT_ID -
MODEL_SNAPSHOT_MIN_VERSION
public static final org.elasticsearch.xcontent.ParseField MODEL_SNAPSHOT_MIN_VERSION -
RESULTS_INDEX_NAME
public static final org.elasticsearch.xcontent.ParseField RESULTS_INDEX_NAME -
DELETING
public static final org.elasticsearch.xcontent.ParseField DELETING -
ALLOW_LAZY_OPEN
public static final org.elasticsearch.xcontent.ParseField ALLOW_LAZY_OPEN -
BLOCKED
public static final org.elasticsearch.xcontent.ParseField BLOCKED -
DATAFEED_CONFIG
public static final org.elasticsearch.xcontent.ParseField DATAFEED_CONFIG -
RESULTS_FIELD
public static final org.elasticsearch.xcontent.ParseField RESULTS_FIELD -
LENIENT_PARSER
-
REST_REQUEST_PARSER
-
MIN_BACKGROUND_PERSIST_INTERVAL
public static final org.elasticsearch.core.TimeValue 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
public org.elasticsearch.core.TimeValue 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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
doXContentBody
public org.elasticsearch.xcontent.XContentBuilder doXContentBody(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.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
-