Class EsqlExecutionInfo.Cluster
java.lang.Object
org.elasticsearch.xpack.esql.action.EsqlExecutionInfo.Cluster
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
- Enclosing class:
EsqlExecutionInfo
public static class EsqlExecutionInfo.Cluster
extends Object
implements org.elasticsearch.xcontent.ToXContentFragment, Writeable
Represents the search metadata about a particular cluster involved in a cross-cluster search.
The Cluster object can represent either the local cluster or a remote cluster.
For the local cluster, clusterAlias should be specified as RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY.
Its XContent is put into the "details" section the "_clusters" entry in the REST query response.
This is an immutable class, so updates made during the search progress (especially important for async
CCS searches) must be done by replacing the Cluster object with a new one.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSince the Cluster object is immutable, use this Builder class to create a new Cluster object using the "copyFrom" Cluster passed in and set only changed values.static enumMarks the status of a Cluster search involved in a Cross-Cluster search.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionCreate a Cluster object representing the initial RUNNING state of a Cluster.Cluster(String clusterAlias, String indexExpression, boolean skipUnavailable, EsqlExecutionInfo.Cluster.Status status) Create a Cluster with a new Status other than the default of RUNNING.Cluster(String clusterAlias, String indexExpression, boolean skipUnavailable, EsqlExecutionInfo.Cluster.Status status, Integer totalShards, Integer successfulShards, Integer skippedShards, Integer failedShards, List<ShardSearchFailure> failures, org.elasticsearch.core.TimeValue took) Cluster(StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.elasticsearch.core.TimeValuegetTook()inthashCode()booleanbooleantoString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out)
-
Field Details
-
INDICES_FIELD
public static final org.elasticsearch.xcontent.ParseField INDICES_FIELD -
STATUS_FIELD
public static final org.elasticsearch.xcontent.ParseField STATUS_FIELD -
TOOK
public static final org.elasticsearch.xcontent.ParseField TOOK
-
-
Constructor Details
-
Cluster
-
Cluster
Create a Cluster object representing the initial RUNNING state of a Cluster.- Parameters:
clusterAlias- clusterAlias as defined in the remote cluster settings or RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY for the local clusterindexExpression- the original (not resolved/concrete) indices expression provided for this cluster.skipUnavailable- whether this Cluster is marked as skip_unavailable in remote cluster settings
-
Cluster
public Cluster(String clusterAlias, String indexExpression, boolean skipUnavailable, EsqlExecutionInfo.Cluster.Status status) Create a Cluster with a new Status other than the default of RUNNING.- Parameters:
clusterAlias- clusterAlias as defined in the remote cluster settings or RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY for the local clusterindexExpression- the original (not resolved/concrete) indices expression provided for this cluster.skipUnavailable- whether cluster is marked as skip_unavailable in remote cluster settingsstatus- current status of the search on this Cluster
-
Cluster
public Cluster(String clusterAlias, String indexExpression, boolean skipUnavailable, EsqlExecutionInfo.Cluster.Status status, Integer totalShards, Integer successfulShards, Integer skippedShards, Integer failedShards, List<ShardSearchFailure> failures, org.elasticsearch.core.TimeValue took) -
Cluster
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
isFragment
public boolean isFragment()- Specified by:
isFragmentin interfaceorg.elasticsearch.xcontent.ToXContent- Specified by:
isFragmentin interfaceorg.elasticsearch.xcontent.ToXContentFragment
-
getClusterAlias
-
getIndexExpression
-
getStatus
-
getTook
public org.elasticsearch.core.TimeValue getTook() -
getTotalShards
-
getSuccessfulShards
-
getSkippedShards
-
getFailedShards
-
getFailures
-
equals
-
hashCode
public int hashCode() -
toString
-