@@ -57,7 +57,6 @@ public class Job implements ToXContentObject {
5757 public static final ParseField DATA_DESCRIPTION = new ParseField ("data_description" );
5858 public static final ParseField DESCRIPTION = new ParseField ("description" );
5959 public static final ParseField FINISHED_TIME = new ParseField ("finished_time" );
60- public static final ParseField LAST_DATA_TIME = new ParseField ("last_data_time" );
6160 public static final ParseField ESTABLISHED_MODEL_MEMORY = new ParseField ("established_model_memory" );
6261 public static final ParseField MODEL_PLOT_CONFIG = new ParseField ("model_plot_config" );
6362 public static final ParseField RENORMALIZATION_WINDOW_DAYS = new ParseField ("renormalization_window_days" );
@@ -82,10 +81,6 @@ public class Job implements ToXContentObject {
8281 (p ) -> TimeUtil .parseTimeField (p , FINISHED_TIME .getPreferredName ()),
8382 FINISHED_TIME ,
8483 ValueType .VALUE );
85- PARSER .declareField (Builder ::setLastDataTime ,
86- (p ) -> TimeUtil .parseTimeField (p , LAST_DATA_TIME .getPreferredName ()),
87- LAST_DATA_TIME ,
88- ValueType .VALUE );
8984 PARSER .declareLong (Builder ::setEstablishedModelMemory , ESTABLISHED_MODEL_MEMORY );
9085 PARSER .declareObject (Builder ::setAnalysisConfig , AnalysisConfig .PARSER , ANALYSIS_CONFIG );
9186 PARSER .declareObject (Builder ::setAnalysisLimits , AnalysisLimits .PARSER , ANALYSIS_LIMITS );
@@ -108,7 +103,6 @@ public class Job implements ToXContentObject {
108103 private final String description ;
109104 private final Date createTime ;
110105 private final Date finishedTime ;
111- private final Date lastDataTime ;
112106 private final Long establishedModelMemory ;
113107 private final AnalysisConfig analysisConfig ;
114108 private final AnalysisLimits analysisLimits ;
@@ -122,8 +116,8 @@ public class Job implements ToXContentObject {
122116 private final String modelSnapshotId ;
123117 private final String resultsIndexName ;
124118
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 ,
127121 AnalysisConfig analysisConfig , AnalysisLimits analysisLimits , DataDescription dataDescription ,
128122 ModelPlotConfig modelPlotConfig , Long renormalizationWindowDays , TimeValue backgroundPersistInterval ,
129123 Long modelSnapshotRetentionDays , Long resultsRetentionDays , Map <String , Object > customSettings ,
@@ -135,7 +129,6 @@ private Job(String jobId, String jobType, List<String> groups, String descriptio
135129 this .description = description ;
136130 this .createTime = createTime ;
137131 this .finishedTime = finishedTime ;
138- this .lastDataTime = lastDataTime ;
139132 this .establishedModelMemory = establishedModelMemory ;
140133 this .analysisConfig = analysisConfig ;
141134 this .analysisLimits = analysisLimits ;
@@ -205,16 +198,6 @@ public Date getFinishedTime() {
205198 return finishedTime ;
206199 }
207200
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-
218201 /**
219202 * The established model memory of the job, or <code>null</code> if model
220203 * memory has not reached equilibrium yet.
@@ -313,10 +296,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
313296 builder .timeField (FINISHED_TIME .getPreferredName (), FINISHED_TIME .getPreferredName () + humanReadableSuffix ,
314297 finishedTime .getTime ());
315298 }
316- if (lastDataTime != null ) {
317- builder .timeField (LAST_DATA_TIME .getPreferredName (), LAST_DATA_TIME .getPreferredName () + humanReadableSuffix ,
318- lastDataTime .getTime ());
319- }
320299 if (establishedModelMemory != null ) {
321300 builder .field (ESTABLISHED_MODEL_MEMORY .getPreferredName (), establishedModelMemory );
322301 }
@@ -372,7 +351,6 @@ public boolean equals(Object other) {
372351 && Objects .equals (this .description , that .description )
373352 && Objects .equals (this .createTime , that .createTime )
374353 && Objects .equals (this .finishedTime , that .finishedTime )
375- && Objects .equals (this .lastDataTime , that .lastDataTime )
376354 && Objects .equals (this .establishedModelMemory , that .establishedModelMemory )
377355 && Objects .equals (this .analysisConfig , that .analysisConfig )
378356 && Objects .equals (this .analysisLimits , that .analysisLimits )
@@ -389,7 +367,7 @@ public boolean equals(Object other) {
389367
390368 @ Override
391369 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 ,
393371 analysisConfig , analysisLimits , dataDescription , modelPlotConfig , renormalizationWindowDays ,
394372 backgroundPersistInterval , modelSnapshotRetentionDays , resultsRetentionDays , customSettings ,
395373 modelSnapshotId , resultsIndexName );
@@ -415,7 +393,6 @@ public static class Builder {
415393 private DataDescription dataDescription ;
416394 private Date createTime ;
417395 private Date finishedTime ;
418- private Date lastDataTime ;
419396 private Long establishedModelMemory ;
420397 private ModelPlotConfig modelPlotConfig ;
421398 private Long renormalizationWindowDays ;
@@ -443,7 +420,6 @@ public Builder(Job job) {
443420 this .dataDescription = job .getDataDescription ();
444421 this .createTime = job .getCreateTime ();
445422 this .finishedTime = job .getFinishedTime ();
446- this .lastDataTime = job .getLastDataTime ();
447423 this .establishedModelMemory = job .getEstablishedModelMemory ();
448424 this .modelPlotConfig = job .getModelPlotConfig ();
449425 this .renormalizationWindowDays = job .getRenormalizationWindowDays ();
@@ -504,16 +480,6 @@ Builder setFinishedTime(Date finishedTime) {
504480 return this ;
505481 }
506482
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-
517483 public Builder setEstablishedModelMemory (Long establishedModelMemory ) {
518484 this .establishedModelMemory = establishedModelMemory ;
519485 return this ;
@@ -568,7 +534,7 @@ public Job build() {
568534 Objects .requireNonNull (id , "[" + ID .getPreferredName () + "] must not be null" );
569535 Objects .requireNonNull (jobType , "[" + JOB_TYPE .getPreferredName () + "] must not be null" );
570536 return new Job (
571- id , jobType , groups , description , createTime , finishedTime , lastDataTime , establishedModelMemory ,
537+ id , jobType , groups , description , createTime , finishedTime , establishedModelMemory ,
572538 analysisConfig , analysisLimits , dataDescription , modelPlotConfig , renormalizationWindowDays ,
573539 backgroundPersistInterval , modelSnapshotRetentionDays , resultsRetentionDays , customSettings ,
574540 modelSnapshotId , resultsIndexName );
0 commit comments