processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/StreamingMergeSortedGrouper.java
/**
   * Returns the minimum buffer capacity required for this grouper.  This grouper keeps track read/write indexes
   * and they cannot point the same array slot at the same time.  Since the read/write indexes move circularly, one
   * extra slot is needed in addition to the read/write slots.  Finally, the required minimum buffer capacity is
   * 3 * record size.
   *
   * @return required minimum buffer capacity
   */
Returns the minimum buffer capacity required for this grouper.  This grouper keeps track read/write indexes
and they cannot point the same array slot at the same time.  Since the read/write indexes move circularly, one
extra slot is needed in addition to the read/write slots.  Finally, the required minimum buffer capacity is
3 * record size.

@return required minimum buffer capacity
Returns the minimum buffer capacity required for this grouper . This grouper keeps track read / write indexes and they cannot point the same array slot at the same time . Since the read / write indexes move circularly one extra slot is needed in addition to the read / write slots . Finally the required minimum buffer capacity is 3 * record size . @return required minimum buffer capacity
public static <KeyType> int requiredBufferCapacity(
      KeySerde<KeyType> keySerde,
      AggregatorFactory[] aggregatorFactories
  )
  {
    int recordSize = keySerde.keySize();
    for (AggregatorFactory aggregatorFactory : aggregatorFactories) {
      recordSize += aggregatorFactory.getMaxIntermediateSizeWithNulls();
    }
    return recordSize * 3;
  }
public static < KeyType > int requiredBufferCapacity ( KeySerde < KeyType > keySerde , AggregatorFactory [ ] aggregatorFactories ) { int recordSize = keySerde . keySize ( ) ; for ( AggregatorFactory aggregatorFactory : aggregatorFactories ) { recordSize += aggregatorFactory . getMaxIntermediateSizeWithNulls ( ) ; } return recordSize * 3 ; }
Returns the minimum buffer capacity required for this grouper.
Returns the minimum buffer capacity required for this grouper .