ParallelCompactionIterable (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db.compaction
Class ParallelCompactionIterable

    java.lang.Object
      org.apache.cassandra.db.compaction.AbstractCompactionIterable
          org.apache.cassandra.db.compaction.ParallelCompactionIterable

All Implemented Interfaces:
  java.lang.Iterable<AbstractCompactedRow>, CompactionInfo.Holder

    public class ParallelCompactionIterable

extends AbstractCompactionIterable

A class to run compaction taking advantage of multiple-core processes: One Deserializer thread per input sstable performs read + deserialize (a row at a time). The resulting ColumnFamilies are added to a queue, which is fed to the merge Reducer. The merge Reducer creates MergeTasks on a thread-per-core Executor, and returns AsyncPrecompactedRow objects. The main complication is in handling larger-than-memory rows. When one is encountered, no further deserialization is done until that row is merged and written -- creating a pipeline stall, as it were. Thus, this is intended to be useful with mostly-in-memory row sizes, but preserves correctness in the face of occasional exceptions.

Field Summary

Fields inherited from class org.apache.cassandra.db.compaction.AbstractCompactionIterable
`bytesRead, controller, scanners, throttle, totalBytes, type`

Constructor Summary
`` | `ParallelCompactionIterable(OperationType type, java.lang.Iterable<SSTableReader> sstables, CompactionController controller)`
`` | `ParallelCompactionIterable(OperationType type, java.lang.Iterable<SSTableReader> sstables, CompactionController controller, int maxInMemorySize)`
`protected` | `ParallelCompactionIterable(OperationType type, java.util.List<SSTableScanner> scanners, CompactionController controller, int maxInMemorySize)`

Method Summary
`CloseableIterator<AbstractCompactedRow>` | `iterator()`

Methods inherited from class org.apache.cassandra.db.compaction.AbstractCompactionIterable
`getCompactionInfo, getScanners`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParallelCompactionIterable

    public ParallelCompactionIterable(OperationType type,
                                      java.lang.Iterable<SSTableReader> sstables,
                                      CompactionController controller)
                               throws java.io.IOException

Throws:
  `java.io.IOException`

### ParallelCompactionIterable

    public ParallelCompactionIterable(OperationType type,
                                      java.lang.Iterable<SSTableReader> sstables,
                                      CompactionController controller,
                                      int maxInMemorySize)
                               throws java.io.IOException

Throws:
  `java.io.IOException`

### ParallelCompactionIterable

    protected ParallelCompactionIterable(OperationType type,
                                         java.util.List<SSTableScanner> scanners,
                                         CompactionController controller,
                                         int maxInMemorySize)

Method Detail

### iterator

    public CloseableIterator<AbstractCompactedRow> iterator()

  Specified by:
    `iterator` in interface `java.lang.Iterable<AbstractCompactedRow>`
  Specified by:
    `iterator` in class `AbstractCompactionIterable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation