tech.ytsaurus.client.request.QueryTrackerReq Maven / Gradle / Ivy
The newest version!
package tech.ytsaurus.client.request;
import java.util.function.Consumer;
abstract class QueryTrackerReq<
TBuilder extends QueryTrackerReq.Builder,
TRequest extends QueryTrackerReq>
extends RequestBase {
protected final String queryTrackerStage;
protected QueryTrackerReq(Builder, ?> builder) {
super(builder);
this.queryTrackerStage = builder.queryTrackerStage;
}
protected void writeQueryTrackerDescriptionToProto(Consumer queryTrackerStageSetter) {
queryTrackerStageSetter.accept(queryTrackerStage);
}
@Override
protected void writeArgumentsLogString(StringBuilder sb) {
sb.append("QueryTrackerStage: ").append(queryTrackerStage).append("; ");
}
public abstract static class Builder<
TBuilder extends Builder,
TRequest extends RequestBase, TRequest>>
extends RequestBase.Builder {
protected String queryTrackerStage = "production";
Builder() {
}
/**
* Set Query tracker's stage in which queries will be run.
* Default value is production.
* @see QueryEngine
* @return self
*/
public TBuilder setQueryTrackerStage(String queryTrackerStage) {
this.queryTrackerStage = queryTrackerStage;
return self();
}
@Override
protected void writeArgumentsLogString(StringBuilder sb) {
sb.append("QueryTrackerStage: ").append(queryTrackerStage).append("; ");
}
}
}