org.apache.cassandra.db.compaction

## Class LazilyCompactedRow.Reducer

- java.lang.Object
- - org.apache.cassandra.utils.MergeIterator.Reducer<OnDiskAtom,OnDiskAtom>
  - - org.apache.cassandra.db.compaction.LazilyCompactedRow.Reducer

- Enclosing class:
    LazilyCompactedRow

      protected class LazilyCompactedRow.Reducer
      extends MergeIterator.Reducer<OnDiskAtom,OnDiskAtom>

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `columns`
    `boolean` | `hasLegacyCounterShards`
    `java.util.List<java.nio.ByteBuffer>` | `maxColumnNameSeen`
    `java.util.List<java.nio.ByteBuffer>` | `minColumnNameSeen`
    `RangeTombstone` | `tombstone`
    `StreamingHistogram` | `tombstones`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Reducer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected OnDiskAtom` | `getReduced()` Called after reduce() has been called for each cell sharing the same name.
    `void` | `reduce(OnDiskAtom current)` Called once per version of a cell that we need to merge, after which getReduced() is called.

    - ### Methods inherited from class org.apache.cassandra.utils.MergeIterator.Reducer

      `close, onKeyChange, trivialReduceIsTrivial`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### tombstone

          public RangeTombstone tombstone

    - #### columns

          public int columns

    - #### tombstones

          public StreamingHistogram tombstones

    - #### minColumnNameSeen

          public java.util.List<java.nio.ByteBuffer> minColumnNameSeen

    - #### maxColumnNameSeen

          public java.util.List<java.nio.ByteBuffer> maxColumnNameSeen

    - #### hasLegacyCounterShards

          public boolean hasLegacyCounterShards

  - ### Constructor Detail

    - #### Reducer

          public Reducer()

  - ### Method Detail

    - #### reduce

          public void reduce(OnDiskAtom current)

      Called once per version of a cell that we need to merge, after which getReduced() is called. In other words, this will be called one or more times with cells that share the same column name.
      Specified by:
        `reduce` in class `MergeIterator.Reducer<OnDiskAtom,OnDiskAtom>`

    - #### getReduced

          protected OnDiskAtom getReduced()

      Called after reduce() has been called for each cell sharing the same name.
      Specified by:
        `getReduced` in class `MergeIterator.Reducer<OnDiskAtom,OnDiskAtom>`
      Returns:
        The last object computed by reduce

Copyright © 2018 The Apache Software Foundation