Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 35 additions & 9 deletions src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using Elasticsearch.Net;
using Newtonsoft.Json;

Expand All @@ -22,7 +23,6 @@ public class CcrStatsResponse : ResponseBase, ICcrStatsResponse
public CcrFollowStats FollowStats { get; internal set; }
}


public class CcrFollowStats
{
/// <inheritdoc cref="IFollowIndexStatsResponse.Indices" />
Expand All @@ -32,28 +32,54 @@ public class CcrFollowStats

public class CcrAutoFollowStats
{

/// <summary>
/// the number of indices that the auto-follow coordinator failed to automatically follow; the causes of recent failures are
/// captured in the logs of the elected master node, and in the auto_follow_stats.recent_auto_follow_errors field
/// The number of indices that the auto-follow coordinator failed to automatically follow; the causes of recent failures are
/// captured in the logs of the elected master node, and in the <see cref="RecentAutoFollowErrors"/> field.
/// </summary>
[JsonProperty("number_of_failed_follow_indices")]
public long NumberOfFailedFollowIndices { get; internal set; }

/// <summary>
/// the number of times that the auto-follow coordinator failed to retrieve the cluster state from a
/// remote cluster registered in a collection of auto-follow patterns
/// The number of times that the auto-follow coordinator failed to retrieve the cluster state from a
/// remote cluster registered in a collection of auto-follow patterns.
/// </summary>
[JsonProperty("number_of_failed_remote_cluster_state_requests")]
public long NumberOfFailedRemoteClusterStateRequests { get; internal set; }

/// <summary> the number of indices that the auto-follow coordinator successfully followed </summary>
/// <summary>The number of indices that the auto-follow coordinator successfully followed.</summary>
[JsonProperty("number_of_successful_follow_indices")]
public long NumberOfSuccessfulFollowIndices { get; internal set; }

/// <summary> an array of objects representing failures by the auto-follow coordinator </summary>
/// <summary>An array of objects representing failures by the auto-follow coordinator.</summary>
[JsonProperty("recent_auto_follow_errors")]
public IReadOnlyCollection<ErrorCause> RecentAutoFollowErrors { get; internal set; } = EmptyReadOnly<ErrorCause>.Collection;

/// <summary>
/// An array of auto followed clusters.
/// </summary>
[JsonProperty("auto_followed_clusters")]
public IReadOnlyCollection< AutoFollowedCluster> AutoFollowedClusters { get; internal set; } = EmptyReadOnly<AutoFollowedCluster>.Collection;
}

public class AutoFollowedCluster
{
/// <summary>
/// The cluster name.
/// </summary>
[JsonProperty("cluster_name")]
public string ClusterName { get; internal set; }

/// <summary>
/// Time since last check.
/// </summary>
[JsonProperty("time_since_last_check_millis")]
[JsonConverter(typeof(EpochMillisecondsDateTimeJsonConverter))]
public DateTimeOffset TimeSinceLastCheck { get; internal set; }

/// <summary>
/// Last seen metadata version.
/// </summary>
[JsonProperty("last_seen_metadata_version")]
public long LastSeenMetadataVersion { get; internal set; }
}
}