@@ -41,8 +41,6 @@ public class ModelSizeStats implements ToXContentObject, Writeable {
4141 */
4242 public static final ParseField MODEL_BYTES_FIELD = new ParseField ("model_bytes" );
4343 public static final ParseField PEAK_MODEL_BYTES_FIELD = new ParseField ("peak_model_bytes" );
44- public static final ParseField SYSTEM_MEMORY_BYTES = new ParseField ("system_memory_bytes" );
45- public static final ParseField MAX_SYSTEM_MEMORY_BYTES = new ParseField ("max_system_memory_bytes" );
4644 public static final ParseField MODEL_BYTES_EXCEEDED_FIELD = new ParseField ("model_bytes_exceeded" );
4745 public static final ParseField MODEL_BYTES_MEMORY_LIMIT_FIELD = new ParseField ("model_bytes_memory_limit" );
4846 public static final ParseField TOTAL_BY_FIELD_COUNT_FIELD = new ParseField ("total_by_field_count" );
@@ -76,8 +74,6 @@ private static ConstructingObjectParser<Builder, Void> createParser(boolean igno
7674 parser .declareString ((modelSizeStat , s ) -> {}, Result .RESULT_TYPE );
7775 parser .declareLong (Builder ::setModelBytes , MODEL_BYTES_FIELD );
7876 parser .declareLong (Builder ::setPeakModelBytes , PEAK_MODEL_BYTES_FIELD );
79- parser .declareLong (Builder ::setSystemMemoryBytes , SYSTEM_MEMORY_BYTES );
80- parser .declareLong (Builder ::setMaxSystemMemoryBytes , MAX_SYSTEM_MEMORY_BYTES );
8177 parser .declareLong (Builder ::setModelBytesExceeded , MODEL_BYTES_EXCEEDED_FIELD );
8278 parser .declareLong (Builder ::setModelBytesMemoryLimit , MODEL_BYTES_MEMORY_LIMIT_FIELD );
8379 parser .declareLong (Builder ::setBucketAllocationFailuresCount , BUCKET_ALLOCATION_FAILURES_COUNT_FIELD );
@@ -156,18 +152,14 @@ public String toString() {
156152 * 1. The job's model_memory_limit
157153 * 2. The current model memory, i.e. what's reported in model_bytes of this object
158154 * 3. The peak model memory, i.e. what's reported in peak_model_bytes of this object
159- * 4. The system memory, i.e. what's reported in system_memory_bytes of this object
160- * 5. The max system memory, i.e. what's reported in max_system_memory_bytes of this object
161155 * The field storing this enum can also be <code>null</code>, which means the
162156 * assignment code will decide on the fly - this was the old behaviour prior
163157 * to 7.11.
164158 */
165159 public enum AssignmentMemoryBasis implements Writeable {
166160 MODEL_MEMORY_LIMIT ,
167161 CURRENT_MODEL_BYTES ,
168- PEAK_MODEL_BYTES ,
169- SYSTEM_MEMORY_BYTES ,
170- MAX_SYSTEM_MEMORY_BYTES ,;
162+ PEAK_MODEL_BYTES ;
171163
172164 public static AssignmentMemoryBasis fromString (String statusName ) {
173165 return valueOf (statusName .trim ().toUpperCase (Locale .ROOT ));
@@ -191,8 +183,6 @@ public String toString() {
191183 private final String jobId ;
192184 private final long modelBytes ;
193185 private final Long peakModelBytes ;
194- private final Long systemMemoryUsageBytes ;
195- private final Long maxSystemMemoryUsageBytes ;
196186 private final Long modelBytesExceeded ;
197187 private final Long modelBytesMemoryLimit ;
198188 private final long totalByFieldCount ;
@@ -216,8 +206,6 @@ private ModelSizeStats(
216206 String jobId ,
217207 long modelBytes ,
218208 Long peakModelBytes ,
219- Long systemMemoryUsageBytes ,
220- Long maxSystemMemoryUsageBytes ,
221209 Long modelBytesExceeded ,
222210 Long modelBytesMemoryLimit ,
223211 long totalByFieldCount ,
@@ -240,8 +228,6 @@ private ModelSizeStats(
240228 this .jobId = jobId ;
241229 this .modelBytes = modelBytes ;
242230 this .peakModelBytes = peakModelBytes ;
243- this .systemMemoryUsageBytes = systemMemoryUsageBytes ;
244- this .maxSystemMemoryUsageBytes = maxSystemMemoryUsageBytes ;
245231 this .modelBytesExceeded = modelBytesExceeded ;
246232 this .modelBytesMemoryLimit = modelBytesMemoryLimit ;
247233 this .totalByFieldCount = totalByFieldCount ;
@@ -266,13 +252,6 @@ public ModelSizeStats(StreamInput in) throws IOException {
266252 jobId = in .readString ();
267253 modelBytes = in .readVLong ();
268254 peakModelBytes = in .readOptionalLong ();
269- if (in .getTransportVersion ().onOrAfter (TransportVersions .ML_AD_SYSTEM_MEMORY_USAGE )) {
270- systemMemoryUsageBytes = in .readOptionalLong ();
271- maxSystemMemoryUsageBytes = in .readOptionalLong ();
272- } else {
273- systemMemoryUsageBytes = null ;
274- maxSystemMemoryUsageBytes = null ;
275- }
276255 modelBytesExceeded = in .readOptionalLong ();
277256 modelBytesMemoryLimit = in .readOptionalLong ();
278257 totalByFieldCount = in .readVLong ();
@@ -314,10 +293,6 @@ public void writeTo(StreamOutput out) throws IOException {
314293 out .writeString (jobId );
315294 out .writeVLong (modelBytes );
316295 out .writeOptionalLong (peakModelBytes );
317- if (out .getTransportVersion ().onOrAfter (TransportVersions .ML_AD_SYSTEM_MEMORY_USAGE )) {
318- out .writeOptionalLong (systemMemoryUsageBytes );
319- out .writeOptionalLong (maxSystemMemoryUsageBytes );
320- }
321296 out .writeOptionalLong (modelBytesExceeded );
322297 out .writeOptionalLong (modelBytesMemoryLimit );
323298 out .writeVLong (totalByFieldCount );
@@ -364,12 +339,6 @@ public XContentBuilder doXContentBody(XContentBuilder builder) throws IOExceptio
364339 if (peakModelBytes != null ) {
365340 builder .field (PEAK_MODEL_BYTES_FIELD .getPreferredName (), peakModelBytes );
366341 }
367- if (systemMemoryUsageBytes != null ) {
368- builder .field (SYSTEM_MEMORY_BYTES .getPreferredName (), systemMemoryUsageBytes );
369- }
370- if (maxSystemMemoryUsageBytes != null ) {
371- builder .field (MAX_SYSTEM_MEMORY_BYTES .getPreferredName (), maxSystemMemoryUsageBytes );
372- }
373342 if (modelBytesExceeded != null ) {
374343 builder .field (MODEL_BYTES_EXCEEDED_FIELD .getPreferredName (), modelBytesExceeded );
375344 }
@@ -422,14 +391,6 @@ public Long getPeakModelBytes() {
422391 return peakModelBytes ;
423392 }
424393
425- public Long getSystemMemoryBytes () {
426- return systemMemoryUsageBytes ;
427- }
428-
429- public Long getMaxSystemMemoryBytes () {
430- return maxSystemMemoryUsageBytes ;
431- }
432-
433394 public Long getModelBytesExceeded () {
434395 return modelBytesExceeded ;
435396 }
@@ -518,8 +479,6 @@ public int hashCode() {
518479 jobId ,
519480 modelBytes ,
520481 peakModelBytes ,
521- systemMemoryUsageBytes ,
522- maxSystemMemoryUsageBytes ,
523482 modelBytesExceeded ,
524483 modelBytesMemoryLimit ,
525484 totalByFieldCount ,
@@ -558,8 +517,6 @@ public boolean equals(Object other) {
558517
559518 return this .modelBytes == that .modelBytes
560519 && Objects .equals (this .peakModelBytes , that .peakModelBytes )
561- && this .systemMemoryUsageBytes == that .systemMemoryUsageBytes
562- && this .maxSystemMemoryUsageBytes == that .maxSystemMemoryUsageBytes
563520 && Objects .equals (this .modelBytesExceeded , that .modelBytesExceeded )
564521 && Objects .equals (this .modelBytesMemoryLimit , that .modelBytesMemoryLimit )
565522 && this .totalByFieldCount == that .totalByFieldCount
@@ -586,8 +543,6 @@ public static class Builder {
586543 private final String jobId ;
587544 private long modelBytes ;
588545 private Long peakModelBytes ;
589- private Long systemMemoryUsageBytes ;
590- private Long maxSystemMemoryUsageBytes ;
591546 private Long modelBytesExceeded ;
592547 private Long modelBytesMemoryLimit ;
593548 private long totalByFieldCount ;
@@ -618,8 +573,6 @@ public Builder(ModelSizeStats modelSizeStats) {
618573 this .jobId = modelSizeStats .jobId ;
619574 this .modelBytes = modelSizeStats .modelBytes ;
620575 this .peakModelBytes = modelSizeStats .peakModelBytes ;
621- this .systemMemoryUsageBytes = modelSizeStats .systemMemoryUsageBytes ;
622- this .maxSystemMemoryUsageBytes = modelSizeStats .maxSystemMemoryUsageBytes ;
623576 this .modelBytesExceeded = modelSizeStats .modelBytesExceeded ;
624577 this .modelBytesMemoryLimit = modelSizeStats .modelBytesMemoryLimit ;
625578 this .totalByFieldCount = modelSizeStats .totalByFieldCount ;
@@ -650,16 +603,6 @@ public Builder setPeakModelBytes(long peakModelBytes) {
650603 return this ;
651604 }
652605
653- public Builder setSystemMemoryBytes (long systemMemoryUsageBytes ) {
654- this .systemMemoryUsageBytes = systemMemoryUsageBytes ;
655- return this ;
656- }
657-
658- public Builder setMaxSystemMemoryBytes (long maxSystemMemoryUsageBytes ) {
659- this .maxSystemMemoryUsageBytes = maxSystemMemoryUsageBytes ;
660- return this ;
661- }
662-
663606 public Builder setModelBytesExceeded (long modelBytesExceeded ) {
664607 this .modelBytesExceeded = modelBytesExceeded ;
665608 return this ;
@@ -757,8 +700,6 @@ public ModelSizeStats build() {
757700 jobId ,
758701 modelBytes ,
759702 peakModelBytes ,
760- systemMemoryUsageBytes ,
761- maxSystemMemoryUsageBytes ,
762703 modelBytesExceeded ,
763704 modelBytesMemoryLimit ,
764705 totalByFieldCount ,
0 commit comments