Skip to content

Commit

Permalink
[Transform] Add accessors required to recreate TransformStats object.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekwitek committed Aug 24, 2023
1 parent c331d92 commit 9de4cec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.elasticsearch.tasks.CancellableTask;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.tasks.TaskId;
import org.elasticsearch.xcontent.ParseField;
import org.elasticsearch.xcontent.ToXContentObject;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xpack.core.action.util.PageParams;
Expand Down Expand Up @@ -170,7 +171,7 @@ public Response(
this(new QueryPage<>(transformStateAndStats, count, TransformField.TRANSFORMS), taskFailures, nodeFailures);
}

private Response(QueryPage<TransformStats> transformsStats) {
public Response(QueryPage<TransformStats> transformsStats) {
this(transformsStats, Collections.emptyList(), Collections.emptyList());
}

Expand All @@ -196,6 +197,10 @@ public long getCount() {
return transformsStats.count();
}

public ParseField getResultsField() {
return transformsStats.getResultsField();
}

@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ public TransformCheckpointingInfo getCheckpointingInfo() {
return checkpointingInfo;
}

public TransformHealth getHealth() {
return health;
}

@Override
public String toString() {
return Strings.toString(this);
Expand Down

0 comments on commit 9de4cec

Please sign in to comment.