Package org.opensearch.index.engine
Class SegmentsStats
java.lang.Object
org.opensearch.index.engine.SegmentsStats
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
@PublicApi(since="1.0.0")
public class SegmentsStats
extends Object
implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentFragment
Tracker for segment stats
- Opensearch.api:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long count) void
add
(SegmentsStats mergeStats) void
addBitsetMemoryInBytes
(long bitsetMemoryInBytes) void
addFileSizes
(Map<String, Long> newFileSizes) void
addIndexWriterMemoryInBytes
(long indexWriterMemoryInBytes) void
addRemoteSegmentStats
(RemoteSegmentStats remoteSegmentStats) void
addReplicationStats
(ReplicationStats replicationStats) void
addVersionMapMemoryInBytes
(long versionMapMemoryInBytes) void
org.opensearch.core.common.unit.ByteSizeValue
long
Estimation of how much the cached bit sets are taking.long
getCount()
The number of segments.Returns mapping of file names to their size (only used in tests)org.opensearch.core.common.unit.ByteSizeValue
long
Estimation of the memory usage by index writerlong
Returns the max timestamp that is used to de-optimize documents with auto-generated IDs in the engine.Returns remote_store based statsorg.opensearch.core.common.unit.ByteSizeValue
long
Estimation of the memory usage by version maporg.opensearch.core.common.unit.ByteSizeValue
Deprecated.org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
writeTo
(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
SegmentsStats
public SegmentsStats() -
SegmentsStats
- Throws:
IOException
-
-
Method Details
-
add
public void add(long count) -
addIndexWriterMemoryInBytes
public void addIndexWriterMemoryInBytes(long indexWriterMemoryInBytes) -
addVersionMapMemoryInBytes
public void addVersionMapMemoryInBytes(long versionMapMemoryInBytes) -
addBitsetMemoryInBytes
public void addBitsetMemoryInBytes(long bitsetMemoryInBytes) -
addRemoteSegmentStats
-
addReplicationStats
-
addFileSizes
-
add
-
getCount
public long getCount()The number of segments. -
getIndexWriterMemoryInBytes
public long getIndexWriterMemoryInBytes()Estimation of the memory usage by index writer -
getIndexWriterMemory
public org.opensearch.core.common.unit.ByteSizeValue getIndexWriterMemory() -
getVersionMapMemoryInBytes
public long getVersionMapMemoryInBytes()Estimation of the memory usage by version map -
getVersionMapMemory
public org.opensearch.core.common.unit.ByteSizeValue getVersionMapMemory() -
getBitsetMemoryInBytes
public long getBitsetMemoryInBytes()Estimation of how much the cached bit sets are taking. (which nested and p/c rely on) -
getBitsetMemory
public org.opensearch.core.common.unit.ByteSizeValue getBitsetMemory() -
getFileSizes
Returns mapping of file names to their size (only used in tests) -
getRemoteSegmentStats
Returns remote_store based stats -
getReplicationStats
-
getMaxUnsafeAutoIdTimestamp
public long getMaxUnsafeAutoIdTimestamp()Returns the max timestamp that is used to de-optimize documents with auto-generated IDs in the engine. This is used to ensure we don't add duplicate documents when we assume an append only case based on auto-generated IDs -
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-
clearFileSizes
public void clearFileSizes() -
getZeroMemory
Deprecated.Used only for deprecating memory tracking in REST interface todo remove in OpenSearch 3.0
-