org.apache.hadoop.hbase.regionserver
Class StripeMultiFileWriter
java.lang.Object
org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
- All Implemented Interfaces:
- Compactor.CellSink
- Direct Known Subclasses:
- StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriter
@InterfaceAudience.Private
public abstract class StripeMultiFileWriter
- extends AbstractMultiFileWriter
Base class for cell sink that separates the provided cells into multiple files for stripe
compaction.
Method Summary |
protected void |
preCloseWriter(StoreFile.Writer writer)
Subclasses override this method to be called before we close the give writer. |
protected void |
sanityCheckLeft(byte[] left,
byte[] row,
int rowOffset,
int rowLength)
Subclasses can call this method to make sure the first KV is within multi-writer range. |
protected void |
sanityCheckRight(byte[] right,
byte[] row,
int rowOffset,
int rowLength)
Subclasses can call this method to make sure the last KV is within multi-writer range. |
void |
setNoStripeMetadata()
|
protected Collection<StoreFile.Writer> |
writers()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
comparator
protected final KeyValue.KVComparator comparator
existingWriters
protected List<StoreFile.Writer> existingWriters
boundaries
protected List<byte[]> boundaries
StripeMultiFileWriter
public StripeMultiFileWriter(KeyValue.KVComparator comparator)
setNoStripeMetadata
public void setNoStripeMetadata()
writers
protected Collection<StoreFile.Writer> writers()
- Specified by:
writers
in class AbstractMultiFileWriter
preCloseWriter
protected void preCloseWriter(StoreFile.Writer writer)
throws IOException
- Description copied from class:
AbstractMultiFileWriter
- Subclasses override this method to be called before we close the give writer. Usually you can
append extra metadata to the writer.
- Overrides:
preCloseWriter
in class AbstractMultiFileWriter
- Throws:
IOException
sanityCheckLeft
protected void sanityCheckLeft(byte[] left,
byte[] row,
int rowOffset,
int rowLength)
throws IOException
- Subclasses can call this method to make sure the first KV is within multi-writer range.
- Parameters:
left
- The left boundary of the writer.row
- The row to check.rowOffset
- Offset for row.rowLength
- Length for row.
- Throws:
IOException
sanityCheckRight
protected void sanityCheckRight(byte[] right,
byte[] row,
int rowOffset,
int rowLength)
throws IOException
- Subclasses can call this method to make sure the last KV is within multi-writer range.
- Parameters:
right
- The right boundary of the writer.row
- The row to check.rowOffset
- Offset for row.rowLength
- Length for row.
- Throws:
IOException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.