org.apache.cassandra.io
Class LazilyCompactedRow

java.lang.Object
  extended by org.apache.cassandra.io.AbstractCompactedRow
      extended by org.apache.cassandra.io.LazilyCompactedRow
All Implemented Interfaces:
java.lang.Iterable<IColumn>, IIterableColumns

public class LazilyCompactedRow
extends AbstractCompactedRow
implements IIterableColumns

LazilyCompactedRow only computes the row bloom filter and column index in memory (at construction time); it does this by reading one column at a time from each of the rows being compacted, and merging them as it does so. So the most we have in memory at a time is the bloom filter, the index, and one column from each pre-compaction row. When write() or update() is called, a second pass is made over the pre-compaction rows to write the merged columns or update the hash, again with at most one column from each row deserialized at a time.


Field Summary
 
Fields inherited from class org.apache.cassandra.io.AbstractCompactedRow
key
 
Constructor Summary
LazilyCompactedRow(ColumnFamilyStore cfStore, java.util.List<SSTableIdentityIterator> rows, boolean major, int gcBefore)
           
 
Method Summary
 int columnCount()
           
 AbstractType getComparator()
           
 int getEstimatedColumnCount()
           
 boolean isEmpty()
           
 java.util.Iterator<IColumn> iterator()
           
 void update(java.security.MessageDigest digest)
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazilyCompactedRow

public LazilyCompactedRow(ColumnFamilyStore cfStore,
                          java.util.List<SSTableIdentityIterator> rows,
                          boolean major,
                          int gcBefore)
Method Detail

write

public void write(java.io.DataOutput out)
           throws java.io.IOException
Specified by:
write in class AbstractCompactedRow
Throws:
java.io.IOException

update

public void update(java.security.MessageDigest digest)
Specified by:
update in class AbstractCompactedRow

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in class AbstractCompactedRow

getEstimatedColumnCount

public int getEstimatedColumnCount()
Specified by:
getEstimatedColumnCount in interface IIterableColumns

getComparator

public AbstractType getComparator()
Specified by:
getComparator in interface IIterableColumns

iterator

public java.util.Iterator<IColumn> iterator()
Specified by:
iterator in interface java.lang.Iterable<IColumn>

columnCount

public int columnCount()
Specified by:
columnCount in class AbstractCompactedRow


Copyright © 2010 The Apache Software Foundation