DefaultCompactionWriter (apache-cassandra API)
Date: 2018-02-12

org.apache.cassandra.db.compaction.writers

## Class DefaultCompactionWriter

- java.lang.Object
- - org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional
  - - org.apache.cassandra.db.compaction.writers.CompactionAwareWriter
    - - org.apache.cassandra.db.compaction.writers.DefaultCompactionWriter

- All Implemented Interfaces:
    java.lang.AutoCloseable, Transactional

      public class DefaultCompactionWriter
      extends CompactionAwareWriter

  The default compaction writer - creates one output file in L0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional

      `Transactional.AbstractTransactional.State`

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Transactional

      `Transactional.AbstractTransactional`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `logger`

    - ### Fields inherited from class org.apache.cassandra.db.compaction.writers.CompactionAwareWriter

      `cfs, estimatedTotalKeys, maxAge, minRepairedAt, nonExpiredSSTables, sstableWriter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultCompactionWriter(ColumnFamilyStore cfs, LifecycleTransaction txn, java.util.Set<SSTableReader> nonExpiredSSTables, boolean offline, OperationType compactionType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `append(AbstractCompactedRow row)` Writes a row in an implementation specific way
    `long` | `estimatedKeys()` estimated number of keys we should write

    - ### Methods inherited from class org.apache.cassandra.db.compaction.writers.CompactionAwareWriter

      `doAbort, doCommit, doPrepare, finish, getDirectories, getWriteDirectory`

    - ### Methods inherited from class org.apache.cassandra.utils.concurrent.Transactional.AbstractTransactional

      `abort, abort, close, commit, commit, doPostCleanup, doPreCleanup, permitRedundantTransitions, prepareToCommit, state`

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

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

    - ### Methods inherited from interface org.apache.cassandra.utils.concurrent.Transactional

      `abort, commit, prepareToCommit`

    - ### Methods inherited from interface java.lang.AutoCloseable

      `close`

- - ### Field Detail

    - #### logger

          protected static final org.slf4j.Logger logger

  - ### Constructor Detail

    - #### DefaultCompactionWriter

          public DefaultCompactionWriter(ColumnFamilyStore cfs,
                                         LifecycleTransaction txn,
                                         java.util.Set<SSTableReader> nonExpiredSSTables,
                                         boolean offline,
                                         OperationType compactionType)

  - ### Method Detail

    - #### append

          public boolean append(AbstractCompactedRow row)

      Description copied from class: `CompactionAwareWriter`
      Writes a row in an implementation specific way
      Specified by:
        `append` in class `CompactionAwareWriter`
      Parameters:
        `row` - the row to append
      Returns:
        true if the row was written, false otherwise

    - #### estimatedKeys

          public long estimatedKeys()

      Description copied from class: `CompactionAwareWriter`
      estimated number of keys we should write
      Overrides:
        `estimatedKeys` in class `CompactionAwareWriter`

Copyright © 2018 The Apache Software Foundation