@@ -57,7 +57,6 @@ public class Job implements ToXContentObject {
57
57
public static final ParseField DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS =
58
58
new ParseField ("daily_model_snapshot_retention_after_days" );
59
59
public static final ParseField RESULTS_RETENTION_DAYS = new ParseField ("results_retention_days" );
60
- public static final ParseField SYSTEM_ANNOTATIONS_RETENTION_DAYS = new ParseField ("system_annotations_retention_days" );
61
60
public static final ParseField MODEL_SNAPSHOT_ID = new ParseField ("model_snapshot_id" );
62
61
public static final ParseField RESULTS_INDEX_NAME = new ParseField ("results_index_name" );
63
62
public static final ParseField DELETING = new ParseField ("deleting" );
@@ -88,7 +87,6 @@ public class Job implements ToXContentObject {
88
87
PARSER .declareString ((builder , val ) -> builder .setBackgroundPersistInterval (
89
88
TimeValue .parseTimeValue (val , BACKGROUND_PERSIST_INTERVAL .getPreferredName ())), BACKGROUND_PERSIST_INTERVAL );
90
89
PARSER .declareLong (Builder ::setResultsRetentionDays , RESULTS_RETENTION_DAYS );
91
- PARSER .declareLong (Builder ::setSystemAnnotationsRetentionDays , SYSTEM_ANNOTATIONS_RETENTION_DAYS );
92
90
PARSER .declareLong (Builder ::setModelSnapshotRetentionDays , MODEL_SNAPSHOT_RETENTION_DAYS );
93
91
PARSER .declareLong (Builder ::setDailyModelSnapshotRetentionAfterDays , DAILY_MODEL_SNAPSHOT_RETENTION_AFTER_DAYS );
94
92
PARSER .declareField (Builder ::setCustomSettings , (p , c ) -> p .mapOrdered (), CUSTOM_SETTINGS , ValueType .OBJECT );
@@ -116,7 +114,6 @@ public class Job implements ToXContentObject {
116
114
private final Long modelSnapshotRetentionDays ;
117
115
private final Long dailyModelSnapshotRetentionAfterDays ;
118
116
private final Long resultsRetentionDays ;
119
- private final Long systemAnnotationsRetentionDays ;
120
117
private final Map <String , Object > customSettings ;
121
118
private final String modelSnapshotId ;
122
119
private final String resultsIndexName ;
@@ -130,7 +127,7 @@ private Job(String jobId, String jobType, List<String> groups, String descriptio
130
127
AnalysisConfig analysisConfig , AnalysisLimits analysisLimits , DataDescription dataDescription ,
131
128
ModelPlotConfig modelPlotConfig , Long renormalizationWindowDays , TimeValue backgroundPersistInterval ,
132
129
Long modelSnapshotRetentionDays , Long dailyModelSnapshotRetentionAfterDays , Long resultsRetentionDays ,
133
- Long systemAnnotationsRetentionDays , Map <String , Object > customSettings , String modelSnapshotId , String resultsIndexName ,
130
+ Map <String , Object > customSettings , String modelSnapshotId , String resultsIndexName ,
134
131
Boolean deleting , Boolean allowLazyOpen , Blocked blocked , DatafeedConfig datafeedConfig ) {
135
132
136
133
this .jobId = jobId ;
@@ -148,7 +145,6 @@ private Job(String jobId, String jobType, List<String> groups, String descriptio
148
145
this .modelSnapshotRetentionDays = modelSnapshotRetentionDays ;
149
146
this .dailyModelSnapshotRetentionAfterDays = dailyModelSnapshotRetentionAfterDays ;
150
147
this .resultsRetentionDays = resultsRetentionDays ;
151
- this .systemAnnotationsRetentionDays = systemAnnotationsRetentionDays ;
152
148
this .customSettings = customSettings == null ? null : Collections .unmodifiableMap (customSettings );
153
149
this .modelSnapshotId = modelSnapshotId ;
154
150
this .resultsIndexName = resultsIndexName ;
@@ -276,10 +272,6 @@ public Long getResultsRetentionDays() {
276
272
return resultsRetentionDays ;
277
273
}
278
274
279
- public Long getSystemAnnotationsRetentionDays () {
280
- return systemAnnotationsRetentionDays ;
281
- }
282
-
283
275
public Map <String , Object > getCustomSettings () {
284
276
return customSettings ;
285
277
}
@@ -354,9 +346,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
354
346
if (resultsRetentionDays != null ) {
355
347
builder .field (RESULTS_RETENTION_DAYS .getPreferredName (), resultsRetentionDays );
356
348
}
357
- if (systemAnnotationsRetentionDays != null ) {
358
- builder .field (SYSTEM_ANNOTATIONS_RETENTION_DAYS .getPreferredName (), systemAnnotationsRetentionDays );
359
- }
360
349
if (customSettings != null ) {
361
350
builder .field (CUSTOM_SETTINGS .getPreferredName (), customSettings );
362
351
}
@@ -411,7 +400,6 @@ public boolean equals(Object other) {
411
400
&& Objects .equals (this .customSettings , that .customSettings )
412
401
&& Objects .equals (this .modelSnapshotId , that .modelSnapshotId )
413
402
&& Objects .equals (this .resultsIndexName , that .resultsIndexName )
414
- && Objects .equals (this .systemAnnotationsRetentionDays , that .systemAnnotationsRetentionDays )
415
403
&& Objects .equals (this .deleting , that .deleting )
416
404
&& Objects .equals (this .allowLazyOpen , that .allowLazyOpen )
417
405
&& Objects .equals (this .blocked , that .blocked )
@@ -423,7 +411,7 @@ public int hashCode() {
423
411
return Objects .hash (jobId , jobType , groups , description , createTime , finishedTime ,
424
412
analysisConfig , analysisLimits , dataDescription , modelPlotConfig , renormalizationWindowDays ,
425
413
backgroundPersistInterval , modelSnapshotRetentionDays , dailyModelSnapshotRetentionAfterDays , resultsRetentionDays ,
426
- systemAnnotationsRetentionDays , customSettings , modelSnapshotId , resultsIndexName , deleting , allowLazyOpen , blocked ,
414
+ customSettings , modelSnapshotId , resultsIndexName , deleting , allowLazyOpen , blocked ,
427
415
datafeedConfig );
428
416
}
429
417
@@ -453,7 +441,6 @@ public static class Builder {
453
441
private Long modelSnapshotRetentionDays ;
454
442
private Long dailyModelSnapshotRetentionAfterDays ;
455
443
private Long resultsRetentionDays ;
456
- private Long systemAnnotationsRetentionDays ;
457
444
private Map <String , Object > customSettings ;
458
445
private String modelSnapshotId ;
459
446
private String resultsIndexName ;
@@ -485,7 +472,6 @@ public Builder(Job job) {
485
472
this .modelSnapshotRetentionDays = job .getModelSnapshotRetentionDays ();
486
473
this .dailyModelSnapshotRetentionAfterDays = job .getDailyModelSnapshotRetentionAfterDays ();
487
474
this .resultsRetentionDays = job .getResultsRetentionDays ();
488
- this .systemAnnotationsRetentionDays = job .getSystemAnnotationsRetentionDays ();
489
475
this .customSettings = job .getCustomSettings () == null ? null : new LinkedHashMap <>(job .getCustomSettings ());
490
476
this .modelSnapshotId = job .getModelSnapshotId ();
491
477
this .resultsIndexName = job .getResultsIndexNameNoPrefix ();
@@ -579,11 +565,6 @@ public Builder setResultsRetentionDays(Long resultsRetentionDays) {
579
565
return this ;
580
566
}
581
567
582
- public Builder setSystemAnnotationsRetentionDays (Long systemAnnotationsRetentionDays ) {
583
- this .systemAnnotationsRetentionDays = systemAnnotationsRetentionDays ;
584
- return this ;
585
- }
586
-
587
568
public Builder setModelSnapshotId (String modelSnapshotId ) {
588
569
this .modelSnapshotId = modelSnapshotId ;
589
570
return this ;
@@ -626,7 +607,7 @@ public Job build() {
626
607
id , jobType , groups , description , createTime , finishedTime ,
627
608
analysisConfig , analysisLimits , dataDescription , modelPlotConfig , renormalizationWindowDays ,
628
609
backgroundPersistInterval , modelSnapshotRetentionDays , dailyModelSnapshotRetentionAfterDays , resultsRetentionDays ,
629
- systemAnnotationsRetentionDays , customSettings , modelSnapshotId , resultsIndexName , deleting , allowLazyOpen , blocked ,
610
+ customSettings , modelSnapshotId , resultsIndexName , deleting , allowLazyOpen , blocked ,
630
611
datafeedConfig == null ? null : datafeedConfig .build ());
631
612
}
632
613
}
0 commit comments