java.lang.Object
org.elasticsearch.xpack.core.ml.job.process.autodetect.state.ModelSnapshot
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class ModelSnapshot extends Object implements org.elasticsearch.xcontent.ToXContentObject, Writeable
ModelSnapshot Result POJO
  • Field Details

    • TIMESTAMP

      public static final org.elasticsearch.xcontent.ParseField TIMESTAMP
      Field Names
    • DESCRIPTION

      public static final org.elasticsearch.xcontent.ParseField DESCRIPTION
    • SNAPSHOT_DOC_COUNT

      public static final org.elasticsearch.xcontent.ParseField SNAPSHOT_DOC_COUNT
    • LATEST_RECORD_TIME

      public static final org.elasticsearch.xcontent.ParseField LATEST_RECORD_TIME
    • LATEST_RESULT_TIME

      public static final org.elasticsearch.xcontent.ParseField LATEST_RESULT_TIME
    • QUANTILES

      public static final org.elasticsearch.xcontent.ParseField QUANTILES
    • RETAIN

      public static final org.elasticsearch.xcontent.ParseField RETAIN
    • MIN_VERSION

      public static final org.elasticsearch.xcontent.ParseField MIN_VERSION
    • RESULTS_FIELD

      public static final org.elasticsearch.xcontent.ParseField RESULTS_FIELD
    • TYPE

      public static final org.elasticsearch.xcontent.ParseField TYPE
      Legacy type, now used only as a discriminant in the document ID
    • STRICT_PARSER

      public static final org.elasticsearch.xcontent.ObjectParser<ModelSnapshot.Builder,Void> STRICT_PARSER
    • LENIENT_PARSER

      public static final org.elasticsearch.xcontent.ObjectParser<ModelSnapshot.Builder,Void> LENIENT_PARSER
    • EMPTY_SNAPSHOT_ID

      public static final String EMPTY_SNAPSHOT_ID
      See Also:
  • Constructor Details

  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • getJobId

      public String getJobId()
    • getMinVersion

      public MlConfigVersion getMinVersion()
    • getTimestamp

      public Date getTimestamp()
    • getDescription

      public String getDescription()
    • getSnapshotId

      public String getSnapshotId()
    • getSnapshotDocCount

      public int getSnapshotDocCount()
    • getModelSizeStats

      public ModelSizeStats getModelSizeStats()
    • getQuantiles

      public Quantiles getQuantiles()
    • getLatestRecordTimeStamp

      public Date getLatestRecordTimeStamp()
    • getLatestResultTimeStamp

      public Date getLatestResultTimeStamp()
    • isRetain

      public boolean isRetain()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Compare all the fields.
      Overrides:
      equals in class Object
    • stateDocumentIds

      public List<String> stateDocumentIds()
    • isTheEmptySnapshot

      public boolean isTheEmptySnapshot()
    • isTheEmptySnapshot

      public static boolean isTheEmptySnapshot(String snapshotId)
    • documentIdPrefix

      public static String documentIdPrefix(String jobId)
    • annotationDocumentId

      public static String annotationDocumentId(ModelSnapshot snapshot)
    • documentId

      public static String documentId(ModelSnapshot snapshot)
    • v54DocumentId

      public static String v54DocumentId(ModelSnapshot snapshot)
      This is how the IDs were formed in v5.4
    • documentId

      public static String documentId(String jobId, String snapshotId)
    • v54DocumentId

      public static String v54DocumentId(String jobId, String snapshotId)
      This is how the IDs were formed in v5.4
    • fromJson

      public static ModelSnapshot fromJson(BytesReference bytesReference)
    • emptySnapshot

      public static ModelSnapshot emptySnapshot(String jobId)