@@ -164,8 +164,8 @@ public void writeTo(StreamOutput out) throws IOException {
164164 private long maxLastIndexRequestTimestamp ;
165165
166166 Stats () {
167- docStatusStats = new DocStatusStats ();
168- // docStatusStats = null;
167+ // docStatusStats = new DocStatusStats();
168+ docStatusStats = null ;
169169 }
170170
171171 /**
@@ -204,7 +204,7 @@ public Stats(StreamInput in) throws IOException {
204204 } else {
205205 maxLastIndexRequestTimestamp = 0L ;
206206 }
207- if (in .getVersion ().onOrAfter (Version .V_2_11_0 ) /* && in.getVersion().onOrBefore(Version.V_3_3_0)*/ ) {
207+ if (in .getVersion ().onOrAfter (Version .V_2_11_0 ) && in .getVersion ().onOrBefore (Version .V_3_3_0 )) {
208208 docStatusStats = in .readOptionalWriteable (DocStatusStats ::new );
209209 } else {
210210 docStatusStats = null ;
@@ -278,60 +278,6 @@ public Stats(
278278 this .maxLastIndexRequestTimestamp = maxLastIndexRequestTimestamp ;
279279 }
280280
281- public Stats (
282- long indexCount ,
283- long indexTimeInMillis ,
284- long indexCurrent ,
285- long indexFailedCount ,
286- long deleteCount ,
287- long deleteTimeInMillis ,
288- long deleteCurrent ,
289- long noopUpdateCount ,
290- boolean isThrottled ,
291- long throttleTimeInMillis
292- ) {
293- this (
294- indexCount ,
295- indexTimeInMillis ,
296- indexCurrent ,
297- indexFailedCount ,
298- deleteCount ,
299- deleteTimeInMillis ,
300- deleteCurrent ,
301- noopUpdateCount ,
302- isThrottled ,
303- throttleTimeInMillis ,
304- 0L
305- );
306- }
307-
308- public Stats (
309- long indexCount ,
310- long indexTimeInMillis ,
311- long indexCurrent ,
312- long indexFailedCount ,
313- long deleteCount ,
314- long deleteTimeInMillis ,
315- long deleteCurrent ,
316- long noopUpdateCount ,
317- boolean isThrottled ,
318- long throttleTimeInMillis ,
319- long maxLastIndexRequestTimestamp
320- ) {
321- this .indexCount = indexCount ;
322- this .indexTimeInMillis = indexTimeInMillis ;
323- this .indexCurrent = indexCurrent ;
324- this .indexFailedCount = indexFailedCount ;
325- this .deleteCount = deleteCount ;
326- this .deleteTimeInMillis = deleteTimeInMillis ;
327- this .deleteCurrent = deleteCurrent ;
328- this .noopUpdateCount = noopUpdateCount ;
329- this .isThrottled = isThrottled ;
330- this .throttleTimeInMillis = throttleTimeInMillis ;
331- this .docStatusStats = null ;
332- this .maxLastIndexRequestTimestamp = maxLastIndexRequestTimestamp ;
333- }
334-
335281 public void add (Stats stats ) {
336282 indexCount += stats .indexCount ;
337283 indexTimeInMillis += stats .indexTimeInMillis ;
@@ -443,7 +389,7 @@ public void writeTo(StreamOutput out) throws IOException {
443389 if (out .getVersion ().onOrAfter (Version .V_3_2_0 )) {
444390 out .writeLong (maxLastIndexRequestTimestamp );
445391 }
446- if (out .getVersion ().onOrAfter (Version .V_2_11_0 )/* && out.getVersion().onOrBefore(Version.V_3_3_0)*/ ) {
392+ if (out .getVersion ().onOrAfter (Version .V_2_11_0 ) && out .getVersion ().onOrBefore (Version .V_3_3_0 )) {
447393 out .writeOptionalWriteable (docStatusStats );
448394 }
449395 }
0 commit comments