Package org.elasticsearch.index.store
Class StoreStats
java.lang.Object
org.elasticsearch.index.store.StoreStats
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic Version
static Version
static long
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.Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionStoreStats(long sizeInBytes, long totalDataSetSizeInBytes, long reservedSize)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add(StoreStats stats)
A prediction of how much larger this store will eventually grow.getSize()
long
size()
long
long
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
UNKNOWN_RESERVED_BYTES
public static final long UNKNOWN_RESERVED_BYTESSentinel 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:
- Constant Field Values
-
RESERVED_BYTES_VERSION
-
TOTAL_DATA_SET_SIZE_SIZE_VERSION
-
-
Constructor Details
-
StoreStats
public StoreStats() -
StoreStats
- Throws:
IOException
-
StoreStats
public StoreStats(long sizeInBytes, long totalDataSetSizeInBytes, long reservedSize)- Parameters:
sizeInBytes
- the size of the store in bytestotalDataSetSizeInBytes
- the size of the total data set in bytes, can differ from sizeInBytes for shards using shared cache storagereservedSize
- a prediction of how much larger the store is expected to grow, orUNKNOWN_RESERVED_BYTES
.
-
-
Method Details
-
add
-
sizeInBytes
public long sizeInBytes() -
getSizeInBytes
public long getSizeInBytes() -
size
-
getSize
-
totalDataSetSize
-
getTotalDataSetSize
-
totalDataSetSizeInBytes
public long totalDataSetSizeInBytes() -
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
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-