Class StripeMultiFileWriter
java.lang.Object
org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
- All Implemented Interfaces:
CellSink
,ShipperListener
- Direct Known Subclasses:
StripeMultiFileWriter.BoundaryMultiWriter
,StripeMultiFileWriter.SizeMultiWriter
Base class for cell sink that separates the provided cells into multiple files for stripe
compaction.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
MultiWriter that separates the cells based on fixed row-key boundaries.static class
MultiWriter that separates the cells based on target cell number per file and file count.Nested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
AbstractMultiFileWriter.WriterFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<byte[]>
protected final CellComparator
private boolean
Whether to write stripe metadataprotected List<StoreFileWriter>
private static final org.slf4j.Logger
Fields inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
sourceScanner, writerFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
preCloseWriter
(StoreFileWriter writer) Subclasses override this method to be called before we close the give writer.protected final void
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
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
protected Collection<StoreFileWriter>
writers()
Methods inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
abortWriters, beforeShipped, commitWriters, commitWriters, init
-
Field Details
-
LOG
-
comparator
-
existingWriters
-
boundaries
-
doWriteStripeMetadata
Whether to write stripe metadata
-
-
Constructor Details
-
StripeMultiFileWriter
-
-
Method Details
-
setNoStripeMetadata
-
writers
- Specified by:
writers
in classAbstractMultiFileWriter
-
preCommitWritersInternal
- Throws:
IOException
-
preCommitWriters
Description copied from class:AbstractMultiFileWriter
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.- Overrides:
preCommitWriters
in classAbstractMultiFileWriter
- Throws:
IOException
-
preCloseWriter
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 classAbstractMultiFileWriter
- Throws:
IOException
-
sanityCheckLeft
Subclasses can call this method to make sure the first KV is within multi-writer range.- Parameters:
left
- The left boundary of the writer.cell
- The cell whose row has to be checked.- Throws:
IOException
-
sanityCheckRight
Subclasses can call this method to make sure the last KV is within multi-writer range.- Parameters:
right
- The right boundary of the writer.- Throws:
IOException
-