Class ForecastRequestStats

java.lang.Object
org.elasticsearch.xpack.core.ml.job.results.ForecastRequestStats
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public final class ForecastRequestStats extends Object implements org.elasticsearch.xcontent.ToXContentObject, Writeable
Model ForecastRequestStats POJO. This information is produced by the autodetect process and contains information about errors, progress and counters. There is exactly 1 document per forecast request, getting updated while the request is processed.
  • Field Details

    • RESULT_TYPE_VALUE

      public static final String RESULT_TYPE_VALUE
      Result type
      See Also:
    • RESULTS_FIELD

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

      public static final org.elasticsearch.xcontent.ParseField FORECAST_ID
    • START_TIME

      public static final org.elasticsearch.xcontent.ParseField START_TIME
    • END_TIME

      public static final org.elasticsearch.xcontent.ParseField END_TIME
    • CREATE_TIME

      public static final org.elasticsearch.xcontent.ParseField CREATE_TIME
    • EXPIRY_TIME

      public static final org.elasticsearch.xcontent.ParseField EXPIRY_TIME
    • MESSAGES

      public static final org.elasticsearch.xcontent.ParseField MESSAGES
    • PROCESSING_TIME_MS

      public static final org.elasticsearch.xcontent.ParseField PROCESSING_TIME_MS
    • PROGRESS

      public static final org.elasticsearch.xcontent.ParseField PROGRESS
    • PROCESSED_RECORD_COUNT

      public static final org.elasticsearch.xcontent.ParseField PROCESSED_RECORD_COUNT
    • STATUS

      public static final org.elasticsearch.xcontent.ParseField STATUS
    • MEMORY_USAGE

      public static final org.elasticsearch.xcontent.ParseField MEMORY_USAGE
    • STRICT_PARSER

      public static final org.elasticsearch.xcontent.ConstructingObjectParser<ForecastRequestStats,Void> STRICT_PARSER
    • LENIENT_PARSER

      public static final org.elasticsearch.xcontent.ConstructingObjectParser<ForecastRequestStats,Void> LENIENT_PARSER
  • 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()
    • getForecastId

      public String getForecastId()
    • documentId

      public static String documentId(String jobId, String forecastId)
    • getId

      public String getId()
      Return the document ID used for indexing. As there is 1 and only 1 document per forecast request, the id has no dynamic parts.
      Returns:
      id
    • setRecordCount

      public void setRecordCount(long recordCount)
    • getRecordCount

      public long getRecordCount()
    • getMessages

      public List<String> getMessages()
    • setMessages

      public void setMessages(List<String> messages)
    • setTimeStamp

      public void setTimeStamp(Instant timeStamp)
    • getTimestamp

      public Instant getTimestamp()
    • setStartTime

      public void setStartTime(Instant startTime)
    • getStartTime

      public Instant getStartTime()
    • getEndTime

      public Instant getEndTime()
    • setEndTime

      public void setEndTime(Instant endTime)
    • setCreateTime

      public void setCreateTime(Instant createTime)
    • getCreateTime

      public Instant getCreateTime()
    • setExpiryTime

      public void setExpiryTime(Instant expiryTime)
    • getExpiryTime

      public Instant getExpiryTime()
    • getProgress

      public double getProgress()
      Progress information of the ForecastRequest in the range 0 to 1, while 1 means finished
      Returns:
      progress value
    • setProgress

      public void setProgress(double progress)
    • getProcessingTime

      public long getProcessingTime()
    • setProcessingTime

      public void setProcessingTime(long processingTime)
    • getMemoryUsage

      public long getMemoryUsage()
    • setMemoryUsage

      public void setMemoryUsage(long memoryUsage)
    • getStatus

    • setStatus

      public void setStatus(ForecastRequestStats.ForecastRequestStatus jobStatus)
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object