Class StoreStats

java.lang.Object
org.elasticsearch.index.store.StoreStats
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentFragment

public class StoreStats extends Object implements Writeable, org.elasticsearch.xcontent.ToXContentFragment
  • Field Details

    • UNKNOWN_RESERVED_BYTES

      public static final long UNKNOWN_RESERVED_BYTES
      Sentinel value for cases where the shard does not yet know its reserved size so we must fall back to an estimate, for instance prior to receiving the list of files in a peer recovery.
      See Also:
    • RESERVED_BYTES_VERSION

      public static final Version RESERVED_BYTES_VERSION
    • TOTAL_DATA_SET_SIZE_SIZE_VERSION

      public static final Version TOTAL_DATA_SET_SIZE_SIZE_VERSION
  • Constructor Details

    • StoreStats

      public StoreStats()
    • StoreStats

      public StoreStats(StreamInput in) throws IOException
      Throws:
      IOException
    • StoreStats

      public StoreStats(long sizeInBytes, long totalDataSetSizeInBytes, long reservedSize)
      Parameters:
      sizeInBytes - the size of the store in bytes
      totalDataSetSizeInBytes - the size of the total data set in bytes, can differ from sizeInBytes for shards using shared cache storage
      reservedSize - a prediction of how much larger the store is expected to grow, or UNKNOWN_RESERVED_BYTES.
  • Method Details

    • add

      public void add(StoreStats stats)
    • sizeInBytes

      public long sizeInBytes()
    • getSizeInBytes

      public long getSizeInBytes()
    • size

      public ByteSizeValue size()
    • getSize

      public ByteSizeValue getSize()
    • totalDataSetSize

      public ByteSizeValue totalDataSetSize()
    • getTotalDataSetSize

      public ByteSizeValue getTotalDataSetSize()
    • totalDataSetSizeInBytes

      public long totalDataSetSizeInBytes()
    • getReservedSize

      public ByteSizeValue getReservedSize()
      A prediction of how much larger this store will eventually grow. For instance, if we are currently doing a peer recovery or restoring a snapshot into this store then we can account for the rest of the recovery using this field. A value of -1B indicates that the reserved size is unknown.
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      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