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
Nested ClassesModifier and TypeClassDescriptionstatic classMultiWriter that separates the cells based on fixed row-key boundaries.static classMultiWriter 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
FieldsModifier and TypeFieldDescriptionprotected List<byte[]>protected final CellComparatorprivate booleanWhether to write stripe metadataprotected List<StoreFileWriter>private static final org.slf4j.LoggerFields inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
sourceScanner, writerFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpreCloseWriter(StoreFileWriter writer) Subclasses override this method to be called before we close the give writer.protected final voidSubclasses 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 voidprotected voidsanityCheckLeft(byte[] left, Cell cell) Subclasses can call this method to make sure the first KV is within multi-writer range.protected voidsanityCheckRight(byte[] right, Cell cell) Subclasses can call this method to make sure the last KV is within multi-writer range.voidprotected 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:
writersin classAbstractMultiFileWriter
-
preCommitWritersInternal
- Throws:
IOException
-
preCommitWriters
Description copied from class:AbstractMultiFileWriterSubclasses 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:
preCommitWritersin classAbstractMultiFileWriter- Throws:
IOException
-
preCloseWriter
Description copied from class:AbstractMultiFileWriterSubclasses override this method to be called before we close the give writer. Usually you can append extra metadata to the writer.- Overrides:
preCloseWriterin 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
-