diff --git a/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java b/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java index f60b6fc85e1..9dff6fe9cb1 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/BulkByScrollTask.java @@ -22,6 +22,7 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.ParseField; +import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -985,6 +986,15 @@ public class BulkByScrollTask extends CancellableTask { } } + @Override + public String toString() { + if (exception != null) { + return "BulkByScrollTask{error=" + Strings.toString(this) + "}"; + } else { + return "BulkByScrollTask{status=" + Strings.toString(this) + "}"; + } + } + @Override public boolean equals(Object obj) { if (obj == null) {