Module org.elasticsearch.server
Class CCSTelemetrySnapshot
java.lang.Object
org.elasticsearch.action.admin.cluster.stats.CCSTelemetrySnapshot
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentFragment
Holds a snapshot of the CCS telemetry statistics from
Theory of operation: - The snapshot is created on each particular node with the stats for the node, and is sent to the coordinating node - Coordinating node creates an empty snapshot and merges all the node snapshots into it using add()
The snapshot contains
CCSUsageTelemetry
.
Used to hold the stats for a single node that's part of a ClusterStatsNodeResponse
, as well as to
accumulate stats for the entire cluster and return them as part of the ClusterStatsResponse
.
Theory of operation: - The snapshot is created on each particular node with the stats for the node, and is sent to the coordinating node - Coordinating node creates an empty snapshot and merges all the node snapshots into it using add()
The snapshot contains
LongMetric.LongMetricValue
s for latencies, which currently contain full histograms (since you can't
produce p90 from a set of node p90s, you need the full histogram for that). To avoid excessive copying (histogram weighs several KB),
the snapshot is designed to be mutable, so that you can add multiple snapshots to it without copying the histograms all the time.
It is not the intent to mutate the snapshot objects otherwise.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty stats instance, that will get additional stats added throughadd(CCSTelemetrySnapshot)
CCSTelemetrySnapshot
(long totalCount, long successCount, Map<String, Long> failureReasons, LongMetric.LongMetricValue took, LongMetric.LongMetricValue tookMrtTrue, LongMetric.LongMetricValue tookMrtFalse, long remotesPerSearchMax, double remotesPerSearchAvg, long skippedRemotes, Map<String, Long> featureCounts, Map<String, Long> clientCounts, Map<String, CCSTelemetrySnapshot.PerClusterCCSTelemetry> byRemoteCluster) Creates a new stats instance with the provided info. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(CCSTelemetrySnapshot stats) Add the provided stats to the ones held by the current instance, effectively merging the two.boolean
double
long
long
long
getTook()
long
int
hashCode()
toString()
toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
CCS_TELEMETRY_FIELD_NAME
- See Also:
-
-
Constructor Details
-
CCSTelemetrySnapshot
public CCSTelemetrySnapshot(long totalCount, long successCount, Map<String, Long> failureReasons, LongMetric.LongMetricValue took, LongMetric.LongMetricValue tookMrtTrue, LongMetric.LongMetricValue tookMrtFalse, long remotesPerSearchMax, double remotesPerSearchAvg, long skippedRemotes, Map<String, Long> featureCounts, Map<String, Long> clientCounts, Map<String, CCSTelemetrySnapshot.PerClusterCCSTelemetry> byRemoteCluster) Creates a new stats instance with the provided info. -
CCSTelemetrySnapshot
public CCSTelemetrySnapshot()Creates a new empty stats instance, that will get additional stats added throughadd(CCSTelemetrySnapshot)
-
CCSTelemetrySnapshot
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getTotalCount
public long getTotalCount() -
getSuccessCount
public long getSuccessCount() -
getFailureReasons
-
getTook
-
getTookMrtTrue
-
getTookMrtFalse
-
getRemotesPerSearchMax
public long getRemotesPerSearchMax() -
getRemotesPerSearchAvg
public double getRemotesPerSearchAvg() -
getSearchCountWithSkippedRemotes
public long getSearchCountWithSkippedRemotes() -
getFeatureCounts
-
getClientCounts
-
getByRemoteCluster
-
add
Add the provided stats to the ones held by the current instance, effectively merging the two.- Parameters:
stats
- the other stats object to add to this one
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-