@@ -57,7 +57,6 @@ public class Job implements ToXContentObject {
57
57
public static final ParseField DATA_DESCRIPTION = new ParseField ("data_description" );
58
58
public static final ParseField DESCRIPTION = new ParseField ("description" );
59
59
public static final ParseField FINISHED_TIME = new ParseField ("finished_time" );
60
- public static final ParseField LAST_DATA_TIME = new ParseField ("last_data_time" );
61
60
public static final ParseField ESTABLISHED_MODEL_MEMORY = new ParseField ("established_model_memory" );
62
61
public static final ParseField MODEL_PLOT_CONFIG = new ParseField ("model_plot_config" );
63
62
public static final ParseField RENORMALIZATION_WINDOW_DAYS = new ParseField ("renormalization_window_days" );
@@ -82,10 +81,6 @@ public class Job implements ToXContentObject {
82
81
(p ) -> TimeUtil .parseTimeField (p , FINISHED_TIME .getPreferredName ()),
83
82
FINISHED_TIME ,
84
83
ValueType .VALUE );
85
- PARSER .declareField (Builder ::setLastDataTime ,
86
- (p ) -> TimeUtil .parseTimeField (p , LAST_DATA_TIME .getPreferredName ()),
87
- LAST_DATA_TIME ,
88
- ValueType .VALUE );
89
84
PARSER .declareLong (Builder ::setEstablishedModelMemory , ESTABLISHED_MODEL_MEMORY );
90
85
PARSER .declareObject (Builder ::setAnalysisConfig , AnalysisConfig .PARSER , ANALYSIS_CONFIG );
91
86
PARSER .declareObject (Builder ::setAnalysisLimits , AnalysisLimits .PARSER , ANALYSIS_LIMITS );
@@ -108,7 +103,6 @@ public class Job implements ToXContentObject {
108
103
private final String description ;
109
104
private final Date createTime ;
110
105
private final Date finishedTime ;
111
- private final Date lastDataTime ;
112
106
private final Long establishedModelMemory ;
113
107
private final AnalysisConfig analysisConfig ;
114
108
private final AnalysisLimits analysisLimits ;
@@ -122,8 +116,8 @@ public class Job implements ToXContentObject {
122
116
private final String modelSnapshotId ;
123
117
private final String resultsIndexName ;
124
118
125
- private Job (String jobId , String jobType , List <String > groups , String description , Date createTime ,
126
- Date finishedTime , Date lastDataTime , Long establishedModelMemory ,
119
+ private Job (String jobId , String jobType , List <String > groups , String description ,
120
+ Date createTime , Date finishedTime , Long establishedModelMemory ,
127
121
AnalysisConfig analysisConfig , AnalysisLimits analysisLimits , DataDescription dataDescription ,
128
122
ModelPlotConfig modelPlotConfig , Long renormalizationWindowDays , TimeValue backgroundPersistInterval ,
129
123
Long modelSnapshotRetentionDays , Long resultsRetentionDays , Map <String , Object > customSettings ,
@@ -135,7 +129,6 @@ private Job(String jobId, String jobType, List<String> groups, String descriptio
135
129
this .description = description ;
136
130
this .createTime = createTime ;
137
131
this .finishedTime = finishedTime ;
138
- this .lastDataTime = lastDataTime ;
139
132
this .establishedModelMemory = establishedModelMemory ;
140
133
this .analysisConfig = analysisConfig ;
141
134
this .analysisLimits = analysisLimits ;
@@ -205,16 +198,6 @@ public Date getFinishedTime() {
205
198
return finishedTime ;
206
199
}
207
200
208
- /**
209
- * The last time data was uploaded to the job or <code>null</code> if no
210
- * data has been seen.
211
- *
212
- * @return The date at which the last data was processed
213
- */
214
- public Date getLastDataTime () {
215
- return lastDataTime ;
216
- }
217
-
218
201
/**
219
202
* The established model memory of the job, or <code>null</code> if model
220
203
* memory has not reached equilibrium yet.
@@ -313,10 +296,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
313
296
builder .timeField (FINISHED_TIME .getPreferredName (), FINISHED_TIME .getPreferredName () + humanReadableSuffix ,
314
297
finishedTime .getTime ());
315
298
}
316
- if (lastDataTime != null ) {
317
- builder .timeField (LAST_DATA_TIME .getPreferredName (), LAST_DATA_TIME .getPreferredName () + humanReadableSuffix ,
318
- lastDataTime .getTime ());
319
- }
320
299
if (establishedModelMemory != null ) {
321
300
builder .field (ESTABLISHED_MODEL_MEMORY .getPreferredName (), establishedModelMemory );
322
301
}
@@ -372,7 +351,6 @@ public boolean equals(Object other) {
372
351
&& Objects .equals (this .description , that .description )
373
352
&& Objects .equals (this .createTime , that .createTime )
374
353
&& Objects .equals (this .finishedTime , that .finishedTime )
375
- && Objects .equals (this .lastDataTime , that .lastDataTime )
376
354
&& Objects .equals (this .establishedModelMemory , that .establishedModelMemory )
377
355
&& Objects .equals (this .analysisConfig , that .analysisConfig )
378
356
&& Objects .equals (this .analysisLimits , that .analysisLimits )
@@ -389,7 +367,7 @@ public boolean equals(Object other) {
389
367
390
368
@ Override
391
369
public int hashCode () {
392
- return Objects .hash (jobId , jobType , groups , description , createTime , finishedTime , lastDataTime , establishedModelMemory ,
370
+ return Objects .hash (jobId , jobType , groups , description , createTime , finishedTime , establishedModelMemory ,
393
371
analysisConfig , analysisLimits , dataDescription , modelPlotConfig , renormalizationWindowDays ,
394
372
backgroundPersistInterval , modelSnapshotRetentionDays , resultsRetentionDays , customSettings ,
395
373
modelSnapshotId , resultsIndexName );
@@ -415,7 +393,6 @@ public static class Builder {
415
393
private DataDescription dataDescription ;
416
394
private Date createTime ;
417
395
private Date finishedTime ;
418
- private Date lastDataTime ;
419
396
private Long establishedModelMemory ;
420
397
private ModelPlotConfig modelPlotConfig ;
421
398
private Long renormalizationWindowDays ;
@@ -443,7 +420,6 @@ public Builder(Job job) {
443
420
this .dataDescription = job .getDataDescription ();
444
421
this .createTime = job .getCreateTime ();
445
422
this .finishedTime = job .getFinishedTime ();
446
- this .lastDataTime = job .getLastDataTime ();
447
423
this .establishedModelMemory = job .getEstablishedModelMemory ();
448
424
this .modelPlotConfig = job .getModelPlotConfig ();
449
425
this .renormalizationWindowDays = job .getRenormalizationWindowDays ();
@@ -504,16 +480,6 @@ Builder setFinishedTime(Date finishedTime) {
504
480
return this ;
505
481
}
506
482
507
- /**
508
- * Set the wall clock time of the last data upload
509
- *
510
- * @param lastDataTime Wall clock time
511
- */
512
- public Builder setLastDataTime (Date lastDataTime ) {
513
- this .lastDataTime = lastDataTime ;
514
- return this ;
515
- }
516
-
517
483
public Builder setEstablishedModelMemory (Long establishedModelMemory ) {
518
484
this .establishedModelMemory = establishedModelMemory ;
519
485
return this ;
@@ -568,7 +534,7 @@ public Job build() {
568
534
Objects .requireNonNull (id , "[" + ID .getPreferredName () + "] must not be null" );
569
535
Objects .requireNonNull (jobType , "[" + JOB_TYPE .getPreferredName () + "] must not be null" );
570
536
return new Job (
571
- id , jobType , groups , description , createTime , finishedTime , lastDataTime , establishedModelMemory ,
537
+ id , jobType , groups , description , createTime , finishedTime , establishedModelMemory ,
572
538
analysisConfig , analysisLimits , dataDescription , modelPlotConfig , renormalizationWindowDays ,
573
539
backgroundPersistInterval , modelSnapshotRetentionDays , resultsRetentionDays , customSettings ,
574
540
modelSnapshotId , resultsIndexName );
0 commit comments