Class JobUpdate.Builder
java.lang.Object
org.elasticsearch.client.ml.job.config.JobUpdate.Builder
- Enclosing class:
- JobUpdate
public static class JobUpdate.Builder
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description Builder(java.lang.String jobId)
NewJobUpdate.Builder
object for the existing job -
Method Summary
Modifier and Type Method Description JobUpdate
build()
JobUpdate.Builder
setAllowLazyOpen(boolean allowLazyOpen)
JobUpdate.Builder
setAnalysisLimits(AnalysisLimits analysisLimits)
JobUpdate.Builder
setBackgroundPersistInterval(org.elasticsearch.common.unit.TimeValue backgroundPersistInterval)
Advanced configuration option.JobUpdate.Builder
setCategorizationFilters(java.util.List<java.lang.String> categorizationFilters)
Sets the categorization filters on theJob
Updates theAnalysisConfig.categorizationFilters
setting.JobUpdate.Builder
setCustomSettings(java.util.Map<java.lang.String,java.lang.Object> customSettings)
Contains custom meta data about the job.JobUpdate.Builder
setDailyModelSnapshotRetentionAfterDays(java.lang.Long dailyModelSnapshotRetentionAfterDays)
The time in days after which only one model snapshot per day is retained for the job.JobUpdate.Builder
setDescription(java.lang.String description)
Set the job description Updates theJob.description
settingJobUpdate.Builder
setDetectorUpdates(java.util.List<JobUpdate.DetectorUpdate> detectorUpdates)
The detector updates to apply to the job Updates theAnalysisConfig.detectors
settingJobUpdate.Builder
setGroups(java.util.List<java.lang.String> groups)
Set the job groups Updates theJob.groups
settingJobUpdate.Builder
setModelPlotConfig(ModelPlotConfig modelPlotConfig)
Enables/disables the model plot config setting throughModelPlotConfig.enabled
Updates theJob.modelPlotConfig
settingJobUpdate.Builder
setModelSnapshotRetentionDays(java.lang.Long modelSnapshotRetentionDays)
The time in days that model snapshots are retained for the job.JobUpdate.Builder
setPerPartitionCategorizationConfig(PerPartitionCategorizationConfig perPartitionCategorizationConfig)
Sets the per-partition categorization options on theJob
Updates theAnalysisConfig.perPartitionCategorizationConfig
setting.JobUpdate.Builder
setRenormalizationWindowDays(java.lang.Long renormalizationWindowDays)
Advanced configuration option.JobUpdate.Builder
setResultsRetentionDays(java.lang.Long resultsRetentionDays)
Advanced configuration option.
-
Constructor Details
-
Builder
public Builder(java.lang.String jobId)NewJobUpdate.Builder
object for the existing job- Parameters:
jobId
- non-null `jobId` for referencing an exisingJob
-
-
Method Details
-
setGroups
Set the job groups Updates theJob.groups
setting- Parameters:
groups
- A list of group names
-
setDescription
Set the job description Updates theJob.description
setting- Parameters:
description
- the desired Machine Learning job description
-
setDetectorUpdates
public JobUpdate.Builder setDetectorUpdates(java.util.List<JobUpdate.DetectorUpdate> detectorUpdates)The detector updates to apply to the job Updates theAnalysisConfig.detectors
setting- Parameters:
detectorUpdates
- list ofJobUpdate.DetectorUpdate
objects
-
setModelPlotConfig
Enables/disables the model plot config setting throughModelPlotConfig.enabled
Updates theJob.modelPlotConfig
setting- Parameters:
modelPlotConfig
-ModelPlotConfig
object with updated fields
-
setAnalysisLimits
- Parameters:
analysisLimits
- Updates toAnalysisLimits
-
setRenormalizationWindowDays
Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen Updates theJob.renormalizationWindowDays
setting- Parameters:
renormalizationWindowDays
- number of renormalization window days
-
setBackgroundPersistInterval
public JobUpdate.Builder setBackgroundPersistInterval(org.elasticsearch.common.unit.TimeValue backgroundPersistInterval)Advanced configuration option. The time between each periodic persistence of the model Updates theJob.backgroundPersistInterval
setting- Parameters:
backgroundPersistInterval
- the time between background persistence
-
setModelSnapshotRetentionDays
The time in days that model snapshots are retained for the job. Updates theJob.modelSnapshotRetentionDays
setting- Parameters:
modelSnapshotRetentionDays
- number of days to keep a model snapshot
-
setDailyModelSnapshotRetentionAfterDays
public JobUpdate.Builder setDailyModelSnapshotRetentionAfterDays(java.lang.Long dailyModelSnapshotRetentionAfterDays)The time in days after which only one model snapshot per day is retained for the job. Updates theJob.dailyModelSnapshotRetentionAfterDays
setting- Parameters:
dailyModelSnapshotRetentionAfterDays
- number of days to keep a model snapshot
-
setResultsRetentionDays
Advanced configuration option. The number of days for which job results are retained Updates theJob.resultsRetentionDays
setting- Parameters:
resultsRetentionDays
- number of days to keep results.
-
setCategorizationFilters
public JobUpdate.Builder setCategorizationFilters(java.util.List<java.lang.String> categorizationFilters)Sets the categorization filters on theJob
Updates theAnalysisConfig.categorizationFilters
setting. RequiresAnalysisConfig.categorizationFieldName
to have been set on the existing Job.- Parameters:
categorizationFilters
- list of categorization filters for the Job'sAnalysisConfig
-
setPerPartitionCategorizationConfig
public JobUpdate.Builder setPerPartitionCategorizationConfig(PerPartitionCategorizationConfig perPartitionCategorizationConfig)Sets the per-partition categorization options on theJob
Updates theAnalysisConfig.perPartitionCategorizationConfig
setting. RequiresAnalysisConfig.perPartitionCategorizationConfig
to have been set on the existing Job.- Parameters:
perPartitionCategorizationConfig
- per-partition categorization options for the Job'sAnalysisConfig
-
setCustomSettings
public JobUpdate.Builder setCustomSettings(java.util.Map<java.lang.String,java.lang.Object> customSettings)Contains custom meta data about the job. Updates theJob.customSettings
setting- Parameters:
customSettings
- custom settings map for the job
-
setAllowLazyOpen
-
build
-