Class JobUpdate.Builder
java.lang.Object
org.elasticsearch.client.ml.job.config.JobUpdate.Builder
- Enclosing class:
- JobUpdate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setAllowLazyOpen(boolean allowLazyOpen) setAnalysisLimits(AnalysisLimits analysisLimits) setBackgroundPersistInterval(org.elasticsearch.core.TimeValue backgroundPersistInterval) Advanced configuration option.setCategorizationFilters(List<String> categorizationFilters) Sets the categorization filters on theJobUpdates theAnalysisConfig.categorizationFilterssetting.setCustomSettings(Map<String, Object> customSettings) Contains custom meta data about the job.setDailyModelSnapshotRetentionAfterDays(Long dailyModelSnapshotRetentionAfterDays) The time in days after which only one model snapshot per day is retained for the job.setDescription(String description) Set the job description Updates theJob.descriptionsettingsetDetectorUpdates(List<JobUpdate.DetectorUpdate> detectorUpdates) The detector updates to apply to the job Updates theAnalysisConfig.detectorssettingSet the job groups Updates theJob.groupssettingsetModelPlotConfig(ModelPlotConfig modelPlotConfig) Enables/disables the model plot config setting throughModelPlotConfig.enabledUpdates theJob.modelPlotConfigsettingsetModelPruneWindow(org.elasticsearch.core.TimeValue modelPruneWindow) setModelSnapshotRetentionDays(Long modelSnapshotRetentionDays) The time in days that model snapshots are retained for the job.setPerPartitionCategorizationConfig(PerPartitionCategorizationConfig perPartitionCategorizationConfig) Sets the per-partition categorization options on theJobUpdates theAnalysisConfig.perPartitionCategorizationConfigsetting.setRenormalizationWindowDays(Long renormalizationWindowDays) Advanced configuration option.setResultsRetentionDays(Long resultsRetentionDays) Advanced configuration option.
-
Constructor Details
-
Builder
NewJobUpdate.Builderobject for the existing job- Parameters:
jobId- non-null `jobId` for referencing an exisingJob
-
-
Method Details
-
setGroups
Set the job groups Updates theJob.groupssetting- Parameters:
groups- A list of group names
-
setDescription
Set the job description Updates theJob.descriptionsetting- Parameters:
description- the desired Machine Learning job description
-
setDetectorUpdates
The detector updates to apply to the job Updates theAnalysisConfig.detectorssetting- Parameters:
detectorUpdates- list ofJobUpdate.DetectorUpdateobjects
-
setModelPlotConfig
Enables/disables the model plot config setting throughModelPlotConfig.enabledUpdates theJob.modelPlotConfigsetting- Parameters:
modelPlotConfig-ModelPlotConfigobject 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.renormalizationWindowDayssetting- 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 theJob.backgroundPersistIntervalsetting- Parameters:
backgroundPersistInterval- the time between background persistence
-
setModelSnapshotRetentionDays
The time in days that model snapshots are retained for the job. Updates theJob.modelSnapshotRetentionDayssetting- 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 theJob.dailyModelSnapshotRetentionAfterDayssetting- 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.resultsRetentionDayssetting- Parameters:
resultsRetentionDays- number of days to keep results.
-
setCategorizationFilters
Sets the categorization filters on theJobUpdates theAnalysisConfig.categorizationFilterssetting. RequiresAnalysisConfig.categorizationFieldNameto 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 theJobUpdates theAnalysisConfig.perPartitionCategorizationConfigsetting. RequiresAnalysisConfig.perPartitionCategorizationConfigto have been set on the existing Job.- Parameters:
perPartitionCategorizationConfig- per-partition categorization options for the Job'sAnalysisConfig
-
setCustomSettings
Contains custom meta data about the job. Updates theJob.customSettingssetting- Parameters:
customSettings- custom settings map for the job
-
setAllowLazyOpen
-
setModelPruneWindow
-
build
-