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.Builderobject for the existing job
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobUpdatebuild()JobUpdate.BuildersetAnalysisLimits(AnalysisLimits analysisLimits)JobUpdate.BuildersetBackgroundPersistInterval(TimeValue backgroundPersistInterval)Advanced configuration option.JobUpdate.BuildersetCategorizationFilters(java.util.List<java.lang.String> categorizationFilters)Sets the categorization filters on theJobUpdates theAnalysisConfig.categorizationFilterssetting.JobUpdate.BuildersetCustomSettings(java.util.Map<java.lang.String,java.lang.Object> customSettings)Contains custom meta data about the job.JobUpdate.BuildersetDescription(java.lang.String description)Set the job description Updates theJob.descriptionsettingJobUpdate.BuildersetDetectorUpdates(java.util.List<JobUpdate.DetectorUpdate> detectorUpdates)The detector updates to apply to the job Updates theAnalysisConfig.detectorssettingJobUpdate.BuildersetGroups(java.util.List<java.lang.String> groups)Set the job groups Updates theJob.groupssettingJobUpdate.BuildersetModelPlotConfig(ModelPlotConfig modelPlotConfig)Enables/disables the model plot config setting throughModelPlotConfig.enabledUpdates theJob.modelPlotConfigsettingJobUpdate.BuildersetModelSnapshotRetentionDays(java.lang.Long modelSnapshotRetentionDays)The time in days that model snapshots are retained for the job.JobUpdate.BuildersetRenormalizationWindowDays(java.lang.Long renormalizationWindowDays)Advanced configuration option.JobUpdate.BuildersetResultsRetentionDays(java.lang.Long resultsRetentionDays)Advanced configuration option.
-
-
-
Constructor Detail
-
Builder
public Builder(java.lang.String jobId)
NewJobUpdate.Builderobject for the existing job- Parameters:
jobId- non-null `jobId` for referencing an exisingJob
-
-
Method Detail
-
setGroups
public JobUpdate.Builder setGroups(java.util.List<java.lang.String> groups)
Set the job groups Updates theJob.groupssetting- Parameters:
groups- A list of group names
-
setDescription
public JobUpdate.Builder setDescription(java.lang.String description)
Set the job description Updates theJob.descriptionsetting- 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.detectorssetting- Parameters:
detectorUpdates- list ofJobUpdate.DetectorUpdateobjects
-
setModelPlotConfig
public JobUpdate.Builder setModelPlotConfig(ModelPlotConfig modelPlotConfig)
Enables/disables the model plot config setting throughModelPlotConfig.enabledUpdates theJob.modelPlotConfigsetting- Parameters:
modelPlotConfig-ModelPlotConfigobject with updated fields
-
setAnalysisLimits
public JobUpdate.Builder setAnalysisLimits(AnalysisLimits analysisLimits)
- Parameters:
analysisLimits- Updates toAnalysisLimits
-
setRenormalizationWindowDays
public JobUpdate.Builder setRenormalizationWindowDays(java.lang.Long renormalizationWindowDays)
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(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
public JobUpdate.Builder setModelSnapshotRetentionDays(java.lang.Long modelSnapshotRetentionDays)
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
-
setResultsRetentionDays
public JobUpdate.Builder setResultsRetentionDays(java.lang.Long resultsRetentionDays)
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
public JobUpdate.Builder setCategorizationFilters(java.util.List<java.lang.String> categorizationFilters)
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
-
setCustomSettings
public JobUpdate.Builder setCustomSettings(java.util.Map<java.lang.String,java.lang.Object> customSettings)
Contains custom meta data about the job. Updates theJob.customSettingssetting- Parameters:
customSettings- custom settings map for the job
-
build
public JobUpdate build()
-
-