@InterfaceAudience.Private public abstract class StripeMultiFileWriter extends AbstractMultiFileWriter
Modifier and Type | Class and Description |
---|---|
static class |
StripeMultiFileWriter.BoundaryMultiWriter
MultiWriter that separates the cells based on fixed row-key boundaries.
|
static class |
StripeMultiFileWriter.SizeMultiWriter
MultiWriter that separates the cells based on target cell number per file and file count.
|
AbstractMultiFileWriter.WriterFactory
Modifier and Type | Field and Description |
---|---|
protected List<byte[]> |
boundaries |
protected KeyValue.KVComparator |
comparator |
protected List<StoreFile.Writer> |
existingWriters |
sourceScanner, writerFactory
Constructor and Description |
---|
StripeMultiFileWriter(KeyValue.KVComparator comparator) |
Modifier and Type | Method and Description |
---|---|
protected void |
preCloseWriter(StoreFile.Writer writer)
Subclasses override this method to be called before we close the give writer.
|
protected void |
preCommitWriters()
Subclasses override this method to be called at the end of a successful sequence of append; all
appends are processed before this method is called.
|
protected abstract void |
preCommitWritersInternal() |
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() |
abortWriters, commitWriters, commitWriters, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append
protected final KeyValue.KVComparator comparator
protected List<StoreFile.Writer> existingWriters
protected List<byte[]> boundaries
public StripeMultiFileWriter(KeyValue.KVComparator comparator)
public void setNoStripeMetadata()
protected Collection<StoreFile.Writer> writers()
writers
in class AbstractMultiFileWriter
protected abstract void preCommitWritersInternal() throws IOException
IOException
protected final void preCommitWriters() throws IOException
AbstractMultiFileWriter
preCommitWriters
in class AbstractMultiFileWriter
IOException
protected void preCloseWriter(StoreFile.Writer writer) throws IOException
AbstractMultiFileWriter
preCloseWriter
in class AbstractMultiFileWriter
IOException
protected void sanityCheckLeft(byte[] left, byte[] row, int rowOffset, int rowLength) throws IOException
left
- The left boundary of the writer.row
- The row to check.rowOffset
- Offset for row.rowLength
- Length for row.IOException
protected void sanityCheckRight(byte[] right, byte[] row, int rowOffset, int rowLength) throws IOException
right
- The right boundary of the writer.row
- The row to check.rowOffset
- Offset for row.rowLength
- Length for row.IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.