26
26
27
27
public class AutoFollowStats implements Writeable , ToXContentObject {
28
28
29
- private static final ParseField NUMBER_OF_SUCCESSFUL_INDICES_AUTO_FOLLOWED =
30
- new ParseField ("number_of_successful_indices_auto_followed" );
31
- private static final ParseField NUMBER_OF_FAILED_INDICES_AUTO_FOLLOWED = new ParseField ("number_of_failed_indices_auto_followed" );
29
+ private static final ParseField NUMBER_OF_SUCCESSFUL_INDICES_AUTO_FOLLOWED = new ParseField ("number_of_successful_follow_indices" );
30
+ private static final ParseField NUMBER_OF_FAILED_INDICES_AUTO_FOLLOWED = new ParseField ("number_of_failed_follow_indices" );
32
31
private static final ParseField NUMBER_OF_FAILED_REMOTE_CLUSTER_STATE_REQUESTS =
33
32
new ParseField ("number_of_failed_remote_cluster_state_requests" );
34
33
private static final ParseField RECENT_AUTO_FOLLOW_ERRORS = new ParseField ("recent_auto_follow_errors" );
@@ -70,48 +69,48 @@ public static AutoFollowStats fromXContent(final XContentParser parser) {
70
69
return STATS_PARSER .apply (parser , null );
71
70
}
72
71
73
- private final long numberOfFailedIndicesAutoFollowed ;
72
+ private final long numberOfFailedFollowIndices ;
74
73
private final long numberOfFailedRemoteClusterStateRequests ;
75
- private final long numberOfSuccessfulIndicesAutoFollowed ;
74
+ private final long numberOfSuccessfulFollowIndices ;
76
75
private final NavigableMap <String , ElasticsearchException > recentAutoFollowErrors ;
77
76
78
77
public AutoFollowStats (
79
- long numberOfFailedIndicesAutoFollowed ,
78
+ long numberOfFailedFollowIndices ,
80
79
long numberOfFailedRemoteClusterStateRequests ,
81
- long numberOfSuccessfulIndicesAutoFollowed ,
80
+ long numberOfSuccessfulFollowIndices ,
82
81
NavigableMap <String , ElasticsearchException > recentAutoFollowErrors
83
82
) {
84
- this .numberOfFailedIndicesAutoFollowed = numberOfFailedIndicesAutoFollowed ;
83
+ this .numberOfFailedFollowIndices = numberOfFailedFollowIndices ;
85
84
this .numberOfFailedRemoteClusterStateRequests = numberOfFailedRemoteClusterStateRequests ;
86
- this .numberOfSuccessfulIndicesAutoFollowed = numberOfSuccessfulIndicesAutoFollowed ;
85
+ this .numberOfSuccessfulFollowIndices = numberOfSuccessfulFollowIndices ;
87
86
this .recentAutoFollowErrors = recentAutoFollowErrors ;
88
87
}
89
88
90
89
public AutoFollowStats (StreamInput in ) throws IOException {
91
- numberOfFailedIndicesAutoFollowed = in .readVLong ();
90
+ numberOfFailedFollowIndices = in .readVLong ();
92
91
numberOfFailedRemoteClusterStateRequests = in .readVLong ();
93
- numberOfSuccessfulIndicesAutoFollowed = in .readVLong ();
92
+ numberOfSuccessfulFollowIndices = in .readVLong ();
94
93
recentAutoFollowErrors = new TreeMap <>(in .readMap (StreamInput ::readString , StreamInput ::readException ));
95
94
}
96
95
97
96
@ Override
98
97
public void writeTo (StreamOutput out ) throws IOException {
99
- out .writeVLong (numberOfFailedIndicesAutoFollowed );
98
+ out .writeVLong (numberOfFailedFollowIndices );
100
99
out .writeVLong (numberOfFailedRemoteClusterStateRequests );
101
- out .writeVLong (numberOfSuccessfulIndicesAutoFollowed );
100
+ out .writeVLong (numberOfSuccessfulFollowIndices );
102
101
out .writeMap (recentAutoFollowErrors , StreamOutput ::writeString , StreamOutput ::writeException );
103
102
}
104
103
105
- public long getNumberOfFailedIndicesAutoFollowed () {
106
- return numberOfFailedIndicesAutoFollowed ;
104
+ public long getNumberOfFailedFollowIndices () {
105
+ return numberOfFailedFollowIndices ;
107
106
}
108
107
109
108
public long getNumberOfFailedRemoteClusterStateRequests () {
110
109
return numberOfFailedRemoteClusterStateRequests ;
111
110
}
112
111
113
- public long getNumberOfSuccessfulIndicesAutoFollowed () {
114
- return numberOfSuccessfulIndicesAutoFollowed ;
112
+ public long getNumberOfSuccessfulFollowIndices () {
113
+ return numberOfSuccessfulFollowIndices ;
115
114
}
116
115
117
116
public NavigableMap <String , ElasticsearchException > getRecentAutoFollowErrors () {
@@ -122,9 +121,9 @@ public NavigableMap<String, ElasticsearchException> getRecentAutoFollowErrors()
122
121
public XContentBuilder toXContent (XContentBuilder builder , Params params ) throws IOException {
123
122
builder .startObject ();
124
123
{
125
- builder .field (NUMBER_OF_FAILED_INDICES_AUTO_FOLLOWED .getPreferredName (), numberOfFailedIndicesAutoFollowed );
124
+ builder .field (NUMBER_OF_FAILED_INDICES_AUTO_FOLLOWED .getPreferredName (), numberOfFailedFollowIndices );
126
125
builder .field (NUMBER_OF_FAILED_REMOTE_CLUSTER_STATE_REQUESTS .getPreferredName (), numberOfFailedRemoteClusterStateRequests );
127
- builder .field (NUMBER_OF_SUCCESSFUL_INDICES_AUTO_FOLLOWED .getPreferredName (), numberOfSuccessfulIndicesAutoFollowed );
126
+ builder .field (NUMBER_OF_SUCCESSFUL_INDICES_AUTO_FOLLOWED .getPreferredName (), numberOfSuccessfulFollowIndices );
128
127
builder .startArray (RECENT_AUTO_FOLLOW_ERRORS .getPreferredName ());
129
128
{
130
129
for (final Map .Entry <String , ElasticsearchException > entry : recentAutoFollowErrors .entrySet ()) {
@@ -152,9 +151,9 @@ public boolean equals(Object o) {
152
151
if (this == o ) return true ;
153
152
if (o == null || getClass () != o .getClass ()) return false ;
154
153
AutoFollowStats that = (AutoFollowStats ) o ;
155
- return numberOfFailedIndicesAutoFollowed == that .numberOfFailedIndicesAutoFollowed &&
154
+ return numberOfFailedFollowIndices == that .numberOfFailedFollowIndices &&
156
155
numberOfFailedRemoteClusterStateRequests == that .numberOfFailedRemoteClusterStateRequests &&
157
- numberOfSuccessfulIndicesAutoFollowed == that .numberOfSuccessfulIndicesAutoFollowed &&
156
+ numberOfSuccessfulFollowIndices == that .numberOfSuccessfulFollowIndices &&
158
157
/*
159
158
* ElasticsearchException does not implement equals so we will assume the fetch exceptions are equal if they are equal
160
159
* up to the key set and their messages. Note that we are relying on the fact that the auto follow exceptions are ordered by
@@ -167,9 +166,9 @@ public boolean equals(Object o) {
167
166
@ Override
168
167
public int hashCode () {
169
168
return Objects .hash (
170
- numberOfFailedIndicesAutoFollowed ,
169
+ numberOfFailedFollowIndices ,
171
170
numberOfFailedRemoteClusterStateRequests ,
172
- numberOfSuccessfulIndicesAutoFollowed ,
171
+ numberOfSuccessfulFollowIndices ,
173
172
/*
174
173
* ElasticsearchException does not implement hash code so we will compute the hash code based on the key set and the
175
174
* messages. Note that we are relying on the fact that the auto follow exceptions are ordered by keys.
@@ -186,9 +185,9 @@ private static List<String> getFetchExceptionMessages(final AutoFollowStats stat
186
185
@ Override
187
186
public String toString () {
188
187
return "AutoFollowStats{" +
189
- "numberOfFailedIndicesAutoFollowed =" + numberOfFailedIndicesAutoFollowed +
188
+ "numberOfFailedFollowIndices =" + numberOfFailedFollowIndices +
190
189
", numberOfFailedRemoteClusterStateRequests=" + numberOfFailedRemoteClusterStateRequests +
191
- ", numberOfSuccessfulIndicesAutoFollowed =" + numberOfSuccessfulIndicesAutoFollowed +
190
+ ", numberOfSuccessfulFollowIndices =" + numberOfSuccessfulFollowIndices +
192
191
", recentAutoFollowErrors=" + recentAutoFollowErrors +
193
192
'}' ;
194
193
}
0 commit comments