java.lang.Object
org.elasticsearch.client.ml.job.config.Job
All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class Job extends Object implements 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.
  • Field Details

    • ANOMALY_DETECTOR_JOB_TYPE

      public static final String 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
    • 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
    • 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
    • PARSER

      public static final org.elasticsearch.xcontent.ObjectParser<Job.Builder,Void> PARSER
  • Method Details

    • getId

      public String getId()
      Return the Job Id.
      Returns:
      The job Id string
    • getJobType

      public String getJobType()
    • getGroups

      public List<String> getGroups()
    • getDescription

      public String getDescription()
      The job description
      Returns:
      job description
    • getCreateTime

      public Date getCreateTime()
      The Job creation time. This name is preferred when serialising to the REST API.
      Returns:
      The date the job was created
    • getFinishedTime

      public Date getFinishedTime()
      The time the job was finished or null if not finished.
      Returns:
      The date the job was last retired or null
    • getAnalysisConfig

      public AnalysisConfig getAnalysisConfig()
      The analysis configuration object
      Returns:
      The AnalysisConfig
    • getAnalysisLimits

      public AnalysisLimits getAnalysisLimits()
      The analysis options object
      Returns:
      The AnalysisLimits
    • getModelPlotConfig

      public ModelPlotConfig getModelPlotConfig()
    • getDataDescription

      public DataDescription 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

      public Long 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

      public Long getModelSnapshotRetentionDays()
    • getDailyModelSnapshotRetentionAfterDays

      public Long getDailyModelSnapshotRetentionAfterDays()
    • getResultsRetentionDays

      public Long getResultsRetentionDays()
    • getCustomSettings

      public Map<String,Object> getCustomSettings()
    • getModelSnapshotId

      public String getModelSnapshotId()
    • getDeleting

      public Boolean getDeleting()
    • getAllowLazyOpen

      public Boolean getAllowLazyOpen()
    • getBlocked

      public Blocked getBlocked()
    • getDatafeedConfig

      public Optional<DatafeedConfig> getDatafeedConfig()
      The currently configured datafeed for the job
      Returns:
      Optional of the datafeed config. Will be none if a datafeed is not configured for this job
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • builder

      public static Job.Builder builder(String id)