Enum Class AggregatorMode

java.lang.Object
java.lang.Enum<AggregatorMode>
org.elasticsearch.compute.aggregation.AggregatorMode
All Implemented Interfaces:
Serializable, Comparable<AggregatorMode>, Constable

public enum AggregatorMode extends Enum<AggregatorMode>
"Modes" for running an aggregate function.

Aggregations running on a single "stream" of Blocks should run in SINGLE mode. This works for aggs that come after a TopNOperator or another agg.

But all other aggregations run distributed. On many threads on each data node we run in INITIAL mode to consume raw data and output just enough to finish the job later. All threads on a node dump the data into the same agg run in INTERMEDIATE mode to perform "node reduction". Then, on the coordinating node, the outputs of the "node reduction" goes into the agg in FINAL mode.

Put another way, all data must flow throw aggregations in one of these two sequences:

  • Enum Constant Details

    • INITIAL

      public static final AggregatorMode INITIAL
      Maps raw inputs to intermediate outputs.
    • INTERMEDIATE

      public static final AggregatorMode INTERMEDIATE
      Maps intermediate inputs to intermediate outputs.
    • FINAL

      public static final AggregatorMode FINAL
      Maps intermediate inputs to final outputs.
    • SINGLE

      public static final AggregatorMode SINGLE
      Maps raw inputs to final outputs. Most useful for testing.
  • Method Details

    • values

      public static AggregatorMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AggregatorMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isInputPartial

      public boolean isInputPartial()
    • isOutputPartial

      public boolean isOutputPartial()