public static class StripeMultiFileWriter.SizeMultiWriter extends StripeMultiFileWriter
StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriter
AbstractMultiFileWriter.WriterFactory
Modifier and Type | Field and Description |
---|---|
private long |
cellsInCurrentWriter |
private long |
cellsSeen |
private long |
cellsSeenInPrevious |
private StoreFileWriter |
currentWriter |
private Cell |
lastCell |
protected byte[] |
lastRowInCurrentWriter |
private byte[] |
left |
private byte[] |
right |
private long |
targetCells |
private int |
targetCount |
boundaries, comparator, existingWriters
sourceScanner, writerFactory
Constructor and Description |
---|
SizeMultiWriter(CellComparator comparator,
int targetCount,
long targetKvs,
byte[] left,
byte[] right) |
Modifier and Type | Method and Description |
---|---|
void |
append(Cell cell)
Append the given cell
|
protected void |
preCommitWritersInternal() |
preCloseWriter, preCommitWriters, sanityCheckLeft, sanityCheckRight, setNoStripeMetadata, writers
abortWriters, beforeShipped, commitWriters, commitWriters, init
private int targetCount
private long targetCells
private byte[] left
private byte[] right
private StoreFileWriter currentWriter
protected byte[] lastRowInCurrentWriter
private long cellsInCurrentWriter
private long cellsSeen
private long cellsSeenInPrevious
public SizeMultiWriter(CellComparator comparator, int targetCount, long targetKvs, byte[] left, byte[] right)
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.public void append(Cell cell) throws IOException
CellSink
cell
- the cell to be added nIOException
protected void preCommitWritersInternal() throws IOException
preCommitWritersInternal
in class StripeMultiFileWriter
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.