public static class StripeMultiFileWriter.SizeMultiWriter extends StripeMultiFileWriter
StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriter, StripeMultiFileWriter.WriterFactory
Modifier and Type | Field and Description |
---|---|
private long |
cellsInCurrentWriter |
private long |
cellsSeen |
private long |
cellsSeenInPrevious |
private StoreFile.Writer |
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 |
---|
StripeMultiFileWriter.SizeMultiWriter(int targetCount,
long targetKvs,
byte[] left,
byte[] right) |
Modifier and Type | Method and Description |
---|---|
void |
append(Cell cell) |
protected void |
commitWritersInternal()
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.
|
abortWriters, commitWriters, init, sanityCheckLeft, sanityCheckRight, setNoStripeMetadata
private int targetCount
private long targetCells
private byte[] left
private byte[] right
private Cell lastCell
private StoreFile.Writer currentWriter
protected byte[] lastRowInCurrentWriter
private long cellsInCurrentWriter
private long cellsSeen
private long cellsSeenInPrevious
public StripeMultiFileWriter.SizeMultiWriter(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
IOException
protected void commitWritersInternal() throws IOException
StripeMultiFileWriter
commitWritersInternal
in class StripeMultiFileWriter
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.