Class ForecastRequestStats

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

public final class ForecastRequestStats extends Object implements 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

  • Constructor Details

  • Method Details

    • writeTo

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

      public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface 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