Class EsqlCCSUtils
java.lang.Object
org.elasticsearch.xpack.esql.session.EsqlCCSUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck whether this exception can be tolerated when partial results are on, or should be treated as fatal.static StringinClusterName(String clusterAlias) static voidinitCrossClusterState(IndicesExpressionGrouper indicesGrouper, XPackLicenseState licenseState, List<IndexPattern> patterns, EsqlExecutionInfo executionInfo) Checks the index expression for the presence of remote clusters.static voidmarkClusterWithFinalStateAndNoShards(EsqlExecutionInfo executionInfo, String clusterAlias, EsqlExecutionInfo.Cluster.Status status, Exception ex) Mark cluster with a final status (success or failure).
-
Method Details
-
initCrossClusterState
public static void initCrossClusterState(IndicesExpressionGrouper indicesGrouper, XPackLicenseState licenseState, List<IndexPattern> patterns, EsqlExecutionInfo executionInfo) throws ElasticsearchStatusException Checks the index expression for the presence of remote clusters. If found, it will ensure that the caller has a valid Enterprise (or Trial) license on the querying cluster as well as initialize corresponding cluster state in execution info.- Throws:
ElasticsearchStatusException- if the license is not valid (or present) for ES|QL CCS search.
-
markClusterWithFinalStateAndNoShards
public static void markClusterWithFinalStateAndNoShards(EsqlExecutionInfo executionInfo, String clusterAlias, EsqlExecutionInfo.Cluster.Status status, @Nullable Exception ex) Mark cluster with a final status (success or failure). Most metrics are set to 0 if not set yet, except for "took" which is set to the total time taken so far. The status must be the final status of the cluster, not RUNNING. -
canAllowPartial
Check whether this exception can be tolerated when partial results are on, or should be treated as fatal.- Returns:
- true if the exception can be tolerated, false if it should be treated as fatal.
-
inClusterName
-