Package org.opensearch.index.remote
Class RemoteSegmentStats
java.lang.Object
org.opensearch.index.remote.RemoteSegmentStats
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable
,org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
@PublicApi(since="2.10.0")
public class RemoteSegmentStats
extends Object
implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentFragment
Tracks remote store segment download and upload stats
Used for displaying remote store stats in IndicesStats/NodeStats API
- 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
ConstructorDescriptionRemoteSegmentStats
(org.opensearch.core.common.io.stream.StreamInput in) RemoteSegmentStats
(RemoteSegmentTransferTracker.Stats trackerStats) Constructor to retrieve metrics fromRemoteSegmentTransferTracker.Stats
which is used inRemoteStoreStats
and provides verbose index level stats of segments transferred to the remote store. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(RemoteSegmentStats existingStats) Adds existing stats.void
addDownloadBytesFailed
(long downloadsFailed) void
addDownloadBytesStarted
(long downloadsStarted) void
addDownloadBytesSucceeded
(long downloadsSucceeded) void
addMaxRefreshBytesLag
(long maxRefreshBytesLag) void
addTotalDownloadTime
(long totalDownloadTime) void
addTotalRefreshBytesLag
(long totalRefreshBytesLag) void
addTotalRejections
(long totalRejections) void
addTotalUploadTime
(long totalUploadTime) void
addUploadBytesFailed
(long uploadsFailed) void
addUploadBytesStarted
(long uploadsStarted) void
addUploadBytesSucceeded
(long uploadsSucceeded) boolean
long
long
long
long
long
long
long
long
long
long
long
long
int
hashCode()
void
setMaxRefreshTimeLag
(long maxRefreshTimeLag) 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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
RemoteSegmentStats
public RemoteSegmentStats() -
RemoteSegmentStats
- Throws:
IOException
-
RemoteSegmentStats
Constructor to retrieve metrics fromRemoteSegmentTransferTracker.Stats
which is used inRemoteStoreStats
and provides verbose index level stats of segments transferred to the remote store.This method is used in
IndexShard
to port over a subset of metrics to be displayed in IndexStats and subsequently rolled up to NodesStats- Parameters:
trackerStats
- : SourceRemoteSegmentTransferTracker.Stats
object from which metrics would be retrieved
-
-
Method Details
-
getUploadBytesStarted
public long getUploadBytesStarted() -
addUploadBytesStarted
public void addUploadBytesStarted(long uploadsStarted) -
getUploadBytesFailed
public long getUploadBytesFailed() -
addUploadBytesFailed
public void addUploadBytesFailed(long uploadsFailed) -
getUploadBytesSucceeded
public long getUploadBytesSucceeded() -
addUploadBytesSucceeded
public void addUploadBytesSucceeded(long uploadsSucceeded) -
getDownloadBytesStarted
public long getDownloadBytesStarted() -
addDownloadBytesStarted
public void addDownloadBytesStarted(long downloadsStarted) -
getDownloadBytesFailed
public long getDownloadBytesFailed() -
addDownloadBytesFailed
public void addDownloadBytesFailed(long downloadsFailed) -
getDownloadBytesSucceeded
public long getDownloadBytesSucceeded() -
addDownloadBytesSucceeded
public void addDownloadBytesSucceeded(long downloadsSucceeded) -
getMaxRefreshTimeLag
public long getMaxRefreshTimeLag() -
setMaxRefreshTimeLag
public void setMaxRefreshTimeLag(long maxRefreshTimeLag) -
getMaxRefreshBytesLag
public long getMaxRefreshBytesLag() -
addMaxRefreshBytesLag
public void addMaxRefreshBytesLag(long maxRefreshBytesLag) -
getTotalRefreshBytesLag
public long getTotalRefreshBytesLag() -
addTotalRefreshBytesLag
public void addTotalRefreshBytesLag(long totalRefreshBytesLag) -
getTotalUploadTime
public long getTotalUploadTime() -
addTotalUploadTime
public void addTotalUploadTime(long totalUploadTime) -
getTotalDownloadTime
public long getTotalDownloadTime() -
addTotalDownloadTime
public void addTotalDownloadTime(long totalDownloadTime) -
getTotalRejections
public long getTotalRejections() -
addTotalRejections
public void addTotalRejections(long totalRejections) -
add
Adds existing stats. Used for stats roll-ups at index or node level- Parameters:
existingStats
- : ExistingRemoteSegmentStats
to add
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-
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
-
equals
-
hashCode
public int hashCode()
-