Class EsqlCCSUtils

java.lang.Object
org.elasticsearch.xpack.esql.session.EsqlCCSUtils

public class EsqlCCSUtils extends Object
  • Method Details

    • initCrossClusterState

      public static void initCrossClusterState(IndicesExpressionGrouper indicesGrouper, XPackLicenseState licenseState, IndexPattern indexPattern, 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

      public static boolean canAllowPartial(Exception e)
      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

      public static String inClusterName(String clusterAlias)