/** * Resolves the topmost aggregator pointed by this path using the given root as a point of reference. * * @param root The point of reference of this path * @return The first child aggregator of the root pointed by this path */ public Aggregator resolveTopmostAggregator(Aggregator root) { AggregationPath.PathElement token = pathElements.get(0); Aggregator aggregator = ProfilingAggregator.unwrap(root.subAggregator(token.name)); assert (aggregator instanceof SingleBucketAggregator ) || (aggregator instanceof NumericMetricsAggregator) : "this should be picked up before aggregation execution - on validate"; return aggregator; }
/** * Resolves the aggregator pointed by this path using the given root as a point of reference. * * @param root The point of reference of this path * @return The aggregator pointed by this path starting from the given aggregator as a point of reference */ public Aggregator resolveAggregator(Aggregator root) { Aggregator aggregator = root; for (int i = 0; i < pathElements.size(); i++) { AggregationPath.PathElement token = pathElements.get(i); aggregator = ProfilingAggregator.unwrap(aggregator.subAggregator(token.name)); assert (aggregator instanceof SingleBucketAggregator && i <= pathElements.size() - 1) || (aggregator instanceof NumericMetricsAggregator && i == pathElements.size() - 1) : "this should be picked up before aggregation execution - on validate"; } return aggregator; }
Aggregator aggregator = root; for (int i = 0; i < pathElements.size(); i++) { aggregator = ProfilingAggregator.unwrap(aggregator.subAggregator(pathElements.get(i).name)); if (aggregator == null) { throw new AggregationExecutionException("Invalid aggregator order path [" + this + "]. Unknown aggregation ["
/** * Resolves the topmost aggregator pointed by this path using the given root as a point of reference. * * @param root The point of reference of this path * @return The first child aggregator of the root pointed by this path */ public Aggregator resolveTopmostAggregator(Aggregator root) { AggregationPath.PathElement token = pathElements.get(0); Aggregator aggregator = ProfilingAggregator.unwrap(root.subAggregator(token.name)); assert (aggregator instanceof SingleBucketAggregator ) || (aggregator instanceof NumericMetricsAggregator) : "this should be picked up before aggregation execution - on validate"; return aggregator; }
/** * Resolves the topmost aggregator pointed by this path using the given root as a point of reference. * * @param root The point of reference of this path * @return The first child aggregator of the root pointed by this path */ public Aggregator resolveTopmostAggregator(Aggregator root) { AggregationPath.PathElement token = pathElements.get(0); Aggregator aggregator = ProfilingAggregator.unwrap(root.subAggregator(token.name)); assert (aggregator instanceof SingleBucketAggregator ) || (aggregator instanceof NumericMetricsAggregator) : "this should be picked up before aggregation execution - on validate"; return aggregator; }
/** * Resolves the aggregator pointed by this path using the given root as a point of reference. * * @param root The point of reference of this path * @return The aggregator pointed by this path starting from the given aggregator as a point of reference */ public Aggregator resolveAggregator(Aggregator root) { Aggregator aggregator = root; for (int i = 0; i < pathElements.size(); i++) { AggregationPath.PathElement token = pathElements.get(i); aggregator = ProfilingAggregator.unwrap(aggregator.subAggregator(token.name)); assert (aggregator instanceof SingleBucketAggregator && i <= pathElements.size() - 1) || (aggregator instanceof NumericMetricsAggregator && i == pathElements.size() - 1) : "this should be picked up before aggregation execution - on validate"; } return aggregator; }
/** * Resolves the aggregator pointed by this path using the given root as a point of reference. * * @param root The point of reference of this path * @return The aggregator pointed by this path starting from the given aggregator as a point of reference */ public Aggregator resolveAggregator(Aggregator root) { Aggregator aggregator = root; for (int i = 0; i < pathElements.size(); i++) { AggregationPath.PathElement token = pathElements.get(i); aggregator = ProfilingAggregator.unwrap(aggregator.subAggregator(token.name)); assert (aggregator instanceof SingleBucketAggregator && i <= pathElements.size() - 1) || (aggregator instanceof NumericMetricsAggregator && i == pathElements.size() - 1) : "this should be picked up before aggregation execution - on validate"; } return aggregator; }
Aggregator aggregator = root; for (int i = 0; i < pathElements.size(); i++) { aggregator = ProfilingAggregator.unwrap(aggregator.subAggregator(pathElements.get(i).name)); if (aggregator == null) { throw new AggregationExecutionException("Invalid aggregator order path [" + this + "]. Unknown aggregation ["
Aggregator aggregator = root; for (int i = 0; i < pathElements.size(); i++) { aggregator = ProfilingAggregator.unwrap(aggregator.subAggregator(pathElements.get(i).name)); if (aggregator == null) { throw new AggregationExecutionException("Invalid aggregator order path [" + this + "]. Unknown aggregation ["