Class JobUpdate.Builder

java.lang.Object
org.elasticsearch.client.ml.job.config.JobUpdate.Builder
Enclosing class:
JobUpdate

public static class JobUpdate.Builder extends Object
  • Constructor Details

    • Builder

      public Builder(String jobId)
      New JobUpdate.Builder object for the existing job
      Parameters:
      jobId - non-null `jobId` for referencing an exising Job
  • Method Details

    • setGroups

      public JobUpdate.Builder setGroups(List<String> groups)
      Set the job groups Updates the Job.groups setting
      Parameters:
      groups - A list of group names
    • setDescription

      public JobUpdate.Builder setDescription(String description)
      Set the job description Updates the Job.description setting
      Parameters:
      description - the desired Machine Learning job description
    • setDetectorUpdates

      public JobUpdate.Builder setDetectorUpdates(List<JobUpdate.DetectorUpdate> detectorUpdates)
      The detector updates to apply to the job Updates the AnalysisConfig.detectors setting
      Parameters:
      detectorUpdates - list of JobUpdate.DetectorUpdate objects
    • setModelPlotConfig

      public JobUpdate.Builder setModelPlotConfig(ModelPlotConfig modelPlotConfig)
      Enables/disables the model plot config setting through ModelPlotConfig.enabled Updates the Job.modelPlotConfig setting
      Parameters:
      modelPlotConfig - ModelPlotConfig object with updated fields
    • setAnalysisLimits

      public JobUpdate.Builder setAnalysisLimits(AnalysisLimits analysisLimits)
      Sets new AnalysisLimits for the Job Updates the Job.analysisLimits setting
      Parameters:
      analysisLimits - Updates to AnalysisLimits
    • setRenormalizationWindowDays

      public JobUpdate.Builder setRenormalizationWindowDays(Long renormalizationWindowDays)
      Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen Updates the Job.renormalizationWindowDays setting
      Parameters:
      renormalizationWindowDays - number of renormalization window days
    • setBackgroundPersistInterval

      public JobUpdate.Builder setBackgroundPersistInterval(org.elasticsearch.core.TimeValue backgroundPersistInterval)
      Advanced configuration option. The time between each periodic persistence of the model Updates the Job.backgroundPersistInterval setting
      Parameters:
      backgroundPersistInterval - the time between background persistence
    • setModelSnapshotRetentionDays

      public JobUpdate.Builder setModelSnapshotRetentionDays(Long modelSnapshotRetentionDays)
      The time in days that model snapshots are retained for the job. Updates the Job.modelSnapshotRetentionDays setting
      Parameters:
      modelSnapshotRetentionDays - number of days to keep a model snapshot
    • setDailyModelSnapshotRetentionAfterDays

      public JobUpdate.Builder setDailyModelSnapshotRetentionAfterDays(Long dailyModelSnapshotRetentionAfterDays)
      The time in days after which only one model snapshot per day is retained for the job. Updates the Job.dailyModelSnapshotRetentionAfterDays setting
      Parameters:
      dailyModelSnapshotRetentionAfterDays - number of days to keep a model snapshot
    • setResultsRetentionDays

      public JobUpdate.Builder setResultsRetentionDays(Long resultsRetentionDays)
      Advanced configuration option. The number of days for which job results are retained Updates the Job.resultsRetentionDays setting
      Parameters:
      resultsRetentionDays - number of days to keep results.
    • setCategorizationFilters

      public JobUpdate.Builder setCategorizationFilters(List<String> categorizationFilters)
      Sets the categorization filters on the Job Updates the AnalysisConfig.categorizationFilters setting. Requires AnalysisConfig.categorizationFieldName to have been set on the existing Job.
      Parameters:
      categorizationFilters - list of categorization filters for the Job's AnalysisConfig
    • setPerPartitionCategorizationConfig

      public JobUpdate.Builder setPerPartitionCategorizationConfig(PerPartitionCategorizationConfig perPartitionCategorizationConfig)
      Sets the per-partition categorization options on the Job Updates the AnalysisConfig.perPartitionCategorizationConfig setting. Requires AnalysisConfig.perPartitionCategorizationConfig to have been set on the existing Job.
      Parameters:
      perPartitionCategorizationConfig - per-partition categorization options for the Job's AnalysisConfig
    • setCustomSettings

      public JobUpdate.Builder setCustomSettings(Map<String,Object> customSettings)
      Contains custom meta data about the job. Updates the Job.customSettings setting
      Parameters:
      customSettings - custom settings map for the job
    • setAllowLazyOpen

      public JobUpdate.Builder setAllowLazyOpen(boolean allowLazyOpen)
    • setModelPruneWindow

      public JobUpdate.Builder setModelPruneWindow(org.elasticsearch.core.TimeValue modelPruneWindow)
    • build

      public JobUpdate build()