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 voidcheckForCcsLicense(EsqlExecutionInfo executionInfo, List<IndexPattern> indices, IndicesExpressionGrouper indicesGrouper, Set<String> configuredClusters, XPackLicenseState licenseState) 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).static booleanshouldIgnoreRuntimeError(EsqlExecutionInfo executionInfo, String clusterAlias, Exception e) We will ignore the error if it's remote unavailable and the cluster is marked to skip unavailable.
-
Method Details
-
checkForCcsLicense
public static void checkForCcsLicense(EsqlExecutionInfo executionInfo, List<IndexPattern> indices, IndicesExpressionGrouper indicesGrouper, Set<String> configuredClusters, XPackLicenseState licenseState) 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.- Parameters:
indices- index expression requested by userindicesGrouper- grouper of index expressions by cluster aliaslicenseState- license state on the querying cluster- 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. -
shouldIgnoreRuntimeError
public static boolean shouldIgnoreRuntimeError(EsqlExecutionInfo executionInfo, String clusterAlias, Exception e) We will ignore the error if it's remote unavailable and the cluster is marked to skip unavailable. -
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.
-