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.SizeMultiWriter
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
AbstractMultiFileWriter.WriterFactory
-
Field Summary
Modifier and TypeFieldDescriptionprivate long
private long
private long
private StoreFileWriter
private Cell
protected byte[]
private byte[]
private byte[]
private long
private int
Fields inherited from class org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
boundaries, comparator, existingWriters
Fields inherited from class org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
sourceScanner, writerFactory
-
Constructor Summary
ConstructorDescriptionSizeMultiWriter
(CellComparator comparator, int targetCount, long targetKvs, byte[] left, byte[] right) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append the given cellprotected void
Methods inherited from class org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
preCloseWriter, preCommitWriters, sanityCheckLeft, sanityCheckRight, setNoStripeMetadata, writers
Methods 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:CellSink
Append the given cell- Parameters:
cell
- the cell to be added- Throws:
IOException
-
preCommitWritersInternal
- Specified by:
preCommitWritersInternal
in classStripeMultiFileWriter
- Throws:
IOException
-