@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 CellComparator |
comparator |
private boolean |
doWriteStripeMetadata
Whether to write stripe metadata
|
protected List<StoreFileWriter> |
existingWriters |
private static org.slf4j.Logger |
LOG |
sourceScanner, writerFactory
Constructor and Description |
---|
StripeMultiFileWriter(CellComparator comparator) |
Modifier and Type | Method and Description |
---|---|
protected void |
preCloseWriter(StoreFileWriter 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,
Cell cell)
Subclasses can call this method to make sure the first KV is within multi-writer range.
|
protected void |
sanityCheckRight(byte[] right,
Cell cell)
Subclasses can call this method to make sure the last KV is within multi-writer range.
|
void |
setNoStripeMetadata() |
protected Collection<StoreFileWriter> |
writers() |
abortWriters, beforeShipped, commitWriters, commitWriters, init
private static final org.slf4j.Logger LOG
protected final CellComparator comparator
protected List<StoreFileWriter> existingWriters
protected List<byte[]> boundaries
private boolean doWriteStripeMetadata
public StripeMultiFileWriter(CellComparator comparator)
public void setNoStripeMetadata()
protected Collection<StoreFileWriter> 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(StoreFileWriter writer) throws IOException
AbstractMultiFileWriter
preCloseWriter
in class AbstractMultiFileWriter
IOException
protected void sanityCheckLeft(byte[] left, Cell cell) throws IOException
left
- The left boundary of the writer.cell
- The cell whose row has to be checked.IOException
protected void sanityCheckRight(byte[] right, Cell cell) throws IOException
right
- The right boundary of the writer.IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.