|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
@InterfaceAudience.Private public abstract class StripeMultiFileWriter
Base class for cell sink that separates the provided cells into multiple files.
| Nested Class Summary | |
|---|---|
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. |
static interface |
StripeMultiFileWriter.WriterFactory
|
| Field Summary | |
|---|---|
protected List<byte[]> |
boundaries
|
protected KeyValue.KVComparator |
comparator
|
protected List<StoreFile.Writer> |
existingWriters
|
protected StoreScanner |
sourceScanner
Source scanner that is tracking KV count; may be null if source is not StoreScanner |
protected StripeMultiFileWriter.WriterFactory |
writerFactory
Factory that is used to produce single StoreFile.Writer-s |
| Constructor Summary | |
|---|---|
StripeMultiFileWriter()
|
|
| Method Summary | |
|---|---|
List<org.apache.hadoop.fs.Path> |
abortWriters()
|
List<org.apache.hadoop.fs.Path> |
commitWriters(long maxSeqId,
boolean isMajor)
|
protected abstract void |
commitWritersInternal()
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. |
void |
init(StoreScanner sourceScanner,
StripeMultiFileWriter.WriterFactory factory,
KeyValue.KVComparator comparator)
Initializes multi-writer before usage. |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.hadoop.hbase.regionserver.compactions.Compactor.CellSink |
|---|
append |
| Field Detail |
|---|
protected StripeMultiFileWriter.WriterFactory writerFactory
protected KeyValue.KVComparator comparator
protected List<StoreFile.Writer> existingWriters
protected List<byte[]> boundaries
protected StoreScanner sourceScanner
| Constructor Detail |
|---|
public StripeMultiFileWriter()
| Method Detail |
|---|
public void init(StoreScanner sourceScanner,
StripeMultiFileWriter.WriterFactory factory,
KeyValue.KVComparator comparator)
throws IOException
sourceScanner - Optional store scanner to obtain the information about read progress.factory - Factory used to produce individual file writers.comparator - Comparator used to compare rows.
IOExceptionpublic void setNoStripeMetadata()
public List<org.apache.hadoop.fs.Path> commitWriters(long maxSeqId,
boolean isMajor)
throws IOException
IOExceptionpublic List<org.apache.hadoop.fs.Path> abortWriters()
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
protected abstract void commitWritersInternal()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||