public static class StripeMultiFileWriter.BoundaryMultiWriter extends StripeMultiFileWriter
StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriter
AbstractMultiFileWriter.WriterFactory
Modifier and Type | Field and Description |
---|---|
private long |
cellsInCurrentWriter |
private StoreFileWriter |
currentWriter |
private byte[] |
currentWriterEndKey |
private boolean |
hasAnyWriter |
private Cell |
lastCell |
private int |
majorRangeFromIndex |
private int |
majorRangeToIndex |
boundaries, comparator, existingWriters
sourceScanner, writerFactory
Constructor and Description |
---|
BoundaryMultiWriter(CellComparator comparator,
List<byte[]> targetBoundaries,
byte[] majorRangeFrom,
byte[] majorRangeTo) |
Modifier and Type | Method and Description |
---|---|
void |
append(Cell cell)
Append the given cell
|
private void |
checkCanCreateWriter() |
private void |
createEmptyWriter()
Called if there are no cells for some stripe.
|
private boolean |
isCellAfterCurrentWriter(Cell cell) |
protected void |
preCommitWritersInternal() |
private void |
prepareWriterFor(Cell cell) |
private void |
stopUsingCurrentWriter() |
preCloseWriter, preCommitWriters, sanityCheckLeft, sanityCheckRight, setNoStripeMetadata, writers
abortWriters, beforeShipped, commitWriters, commitWriters, init
private StoreFileWriter currentWriter
private byte[] currentWriterEndKey
private long cellsInCurrentWriter
private int majorRangeFromIndex
private int majorRangeToIndex
private boolean hasAnyWriter
public BoundaryMultiWriter(CellComparator comparator, List<byte[]> targetBoundaries, byte[] majorRangeFrom, byte[] majorRangeTo) throws IOException
targetBoundaries
- The boundaries on which writers/files are separated.majorRangeFrom
- Major range is the range for which at least one file should be
written (because all files are included in compaction).
majorRangeFrom is the left boundary.majorRangeTo
- The right boundary of majorRange (see majorRangeFrom).IOException
public void append(Cell cell) throws IOException
CellSink
cell
- the cell to be added nIOException
private boolean isCellAfterCurrentWriter(Cell cell)
protected void preCommitWritersInternal() throws IOException
preCommitWritersInternal
in class StripeMultiFileWriter
IOException
private void prepareWriterFor(Cell cell) throws IOException
IOException
private void createEmptyWriter() throws IOException
IOException
private void checkCanCreateWriter() throws IOException
IOException
private void stopUsingCurrentWriter()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.