PrecompactedRow (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 PrecompactedRow

    java.lang.Object
      org.apache.cassandra.db.compaction.AbstractCompactedRow
          org.apache.cassandra.db.compaction.PrecompactedRow

    public class PrecompactedRow

extends AbstractCompactedRow

PrecompactedRow merges its rows in its constructor in memory.

Field Summary

Fields inherited from class org.apache.cassandra.db.compaction.AbstractCompactedRow
`key`

Constructor Summary
`PrecompactedRow(CompactionController controller, java.util.List<SSTableIdentityIterator> rows)`
`PrecompactedRow(DecoratedKey<?> key, ColumnFamily cf)` it is caller's responsibility to call removeDeleted + removeOldShards from the cf before calling this constructor

Method Summary
`int` | `columnCount()`
`ColumnFamily` | `getFullColumnFamily()`
`boolean` | `isEmpty()`
`long` | `maxTimestamp()`
`static ColumnFamily` | `removeDeletedAndOldShards(DecoratedKey<?> key, CompactionController controller, ColumnFamily cf)`
`static ColumnFamily` | `removeDeletedAndOldShards(DecoratedKey key, boolean shouldPurge, CompactionController controller, ColumnFamily cf)`
`void` | `update(java.security.MessageDigest digest)` update @param digest with the data bytes of the row (not including row key or row size).
`long` | `write(java.io.DataOutput out)` write the row (size + column index + filter + column data, but NOT row key) to @param out.

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

Constructor Detail

### PrecompactedRow

    public PrecompactedRow(DecoratedKey<?> key,
                           ColumnFamily cf)

  it is caller's responsibility to call removeDeleted + removeOldShards from the cf before calling this constructor

### PrecompactedRow

    public PrecompactedRow(CompactionController controller,
                           java.util.List<SSTableIdentityIterator> rows)

Method Detail

### removeDeletedAndOldShards

    public static ColumnFamily removeDeletedAndOldShards(DecoratedKey<?> key,
                                                         CompactionController controller,
                                                         ColumnFamily cf)

### removeDeletedAndOldShards

    public static ColumnFamily removeDeletedAndOldShards(DecoratedKey key,
                                                         boolean shouldPurge,
                                                         CompactionController controller,
                                                         ColumnFamily cf)

### write

    public long write(java.io.DataOutput out)
               throws java.io.IOException

  Description copied from class: `AbstractCompactedRow`
  write the row (size + column index + filter + column data, but NOT row key) to @param out. It is an error to call this if isEmpty is false. (Because the key is appended first, so we'd have an incomplete row written.) write() may change internal state; it is NOT valid to call write() or update() a second time.

  Specified by:
    `write` in class `AbstractCompactedRow`
  Throws:
    `java.io.IOException`

### update

    public void update(java.security.MessageDigest digest)

  Description copied from class: `AbstractCompactedRow`
  update @param digest with the data bytes of the row (not including row key or row size). May be called even if empty. update() may change internal state; it is NOT valid to call write() or update() a second time.

  Specified by:
    `update` in class `AbstractCompactedRow`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in class `AbstractCompactedRow`
  Returns:
    true if there are no columns in the row AND there are no row-level tombstones to be preserved

### columnCount

    public int columnCount()

  Specified by:
    `columnCount` in class `AbstractCompactedRow`
  Returns:
    the number of columns in the row

### maxTimestamp

    public long maxTimestamp()

  Specified by:
    `maxTimestamp` in class `AbstractCompactedRow`
  Returns:
    the max column timestamp in the row or Long.MIN_VALUE if computing this value would require extra effort we're not willing to make.

### getFullColumnFamily

    public ColumnFamily getFullColumnFamily()
                                     throws java.io.IOException

  Returns:
    the full column family represented by this compacted row. We do not provide this method for other AbstractCompactedRow, because this fits the whole row into memory and don't make sense for those other implementations.
  Throws:
    `java.io.IOException`

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