Class StripeMultiFileWriter.SizeMultiWriter
java.lang.Object
org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter.SizeMultiWriter
- All Implemented Interfaces:
CellSink,ShipperListener
- Enclosing class:
- StripeMultiFileWriter
MultiWriter that separates the cells based on target cell number per file and file count. New
file is started every time the target number of KVs is reached, unless the fixed count of
writers has already been created (in that case all the remaining KVs go into the last writer).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriterNested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
AbstractMultiFileWriter.WriterFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate longprivate longprivate StoreFileWriterprivate Cellprotected byte[]private byte[]private byte[]private longprivate intFields inherited from class org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
boundaries, comparator, existingWritersFields inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
sourceScanner, writerFactory -
Constructor Summary
ConstructorsConstructorDescriptionSizeMultiWriter(CellComparator comparator, int targetCount, long targetKvs, byte[] left, byte[] right) -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(ExtendedCell cell) Append the given cellprotected voidMethods inherited from class org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
preCloseWriter, preCommitWriters, sanityCheckLeft, sanityCheckRight, setNoStripeMetadata, writersMethods inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
abortWriters, beforeShipped, commitWriters, commitWriters, init
-
Field Details
-
targetCount
-
targetCells
-
left
-
right
-
lastCell
-
currentWriter
-
lastRowInCurrentWriter
-
cellsInCurrentWriter
-
cellsSeen
-
cellsSeenInPrevious
-
-
Constructor Details
-
SizeMultiWriter
public SizeMultiWriter(CellComparator comparator, int targetCount, long targetKvs, byte[] left, byte[] right) - Parameters:
targetCount- The maximum count of writers that can be created.targetKvs- The number of KVs to read from source before starting each new writer.left- The left boundary of the first writer.right- The right boundary of the last writer.
-
-
Method Details
-
append
Description copied from interface:CellSinkAppend the given cell- Parameters:
cell- the cell to be added- Throws:
IOException
-
preCommitWritersInternal
- Specified by:
preCommitWritersInternalin classStripeMultiFileWriter- Throws:
IOException
-