org.apache.cassandra.io
Class CompactionIterator
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<T2>
org.apache.cassandra.utils.ReducingIterator<IteratingRow,CompactionIterator.CompactedRow>
org.apache.cassandra.io.CompactionIterator
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Iterable<CompactionIterator.CompactedRow>, java.util.Iterator<CompactionIterator.CompactedRow>
public class CompactionIterator
- extends ReducingIterator<IteratingRow,CompactionIterator.CompactedRow>
- implements java.io.Closeable
Methods inherited from class com.google.common.collect.AbstractIterator |
endOfData, hasNext, next, peek |
Methods inherited from class com.google.common.collect.UnmodifiableIterator |
remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
FILE_BUFFER_SIZE
protected static final int FILE_BUFFER_SIZE
- See Also:
- Constant Field Values
CompactionIterator
public CompactionIterator(java.lang.Iterable<SSTableReader> sstables,
int gcBefore,
boolean major)
throws java.io.IOException
- Throws:
java.io.IOException
CompactionIterator
protected CompactionIterator(java.util.Iterator iter,
int gcBefore,
boolean major)
getCollatingIterator
protected static org.apache.commons.collections.iterators.CollatingIterator getCollatingIterator(java.lang.Iterable<SSTableReader> sstables)
throws java.io.IOException
- Throws:
java.io.IOException
isEqual
protected boolean isEqual(IteratingRow o1,
IteratingRow o2)
- Description copied from class:
ReducingIterator
- override this if the keys you want to base the reduce on are not the same as the object itself (but can be generated from it)
- Overrides:
isEqual
in class ReducingIterator<IteratingRow,CompactionIterator.CompactedRow>
reduce
public void reduce(IteratingRow current)
- Description copied from class:
ReducingIterator
- combine this object with the previous ones. intermediate state is up to your implementation.
- Specified by:
reduce
in class ReducingIterator<IteratingRow,CompactionIterator.CompactedRow>
getReduced
protected CompactionIterator.CompactedRow getReduced()
- Description copied from class:
ReducingIterator
- return the last object computed by reduce
- Specified by:
getReduced
in class ReducingIterator<IteratingRow,CompactionIterator.CompactedRow>
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Throws:
java.io.IOException
getScanners
protected java.lang.Iterable<SSTableScanner> getScanners()
getTotalBytes
public long getTotalBytes()
getBytesRead
public long getBytesRead()
Copyright © 2010 The Apache Software Foundation