public static class StripeMultiFileWriter.BoundaryMultiWriter extends StripeMultiFileWriter
StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriter, StripeMultiFileWriter.WriterFactory
Modifier and Type | Field and Description |
---|---|
private long |
cellsInCurrentWriter |
private StoreFile.Writer |
currentWriter |
private byte[] |
currentWriterEndKey |
private boolean |
hasAnyWriter |
private Cell |
lastCell |
private int |
majorRangeFromIndex |
private int |
majorRangeToIndex |
boundaries, comparator, existingWriters, sourceScanner, writerFactory
Constructor and Description |
---|
StripeMultiFileWriter.BoundaryMultiWriter(List<byte[]> targetBoundaries,
byte[] majorRangeFrom,
byte[] majorRangeTo) |
Modifier and Type | Method and Description |
---|---|
void |
append(Cell cell) |
private void |
checkCanCreateWriter() |
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.
|
private void |
createEmptyWriter()
Called if there are no cells for some stripe.
|
private boolean |
isCellAfterCurrentWriter(Cell cell) |
private void |
prepareWriterFor(Cell cell) |
private void |
stopUsingCurrentWriter() |
abortWriters, commitWriters, init, sanityCheckLeft, sanityCheckRight, setNoStripeMetadata
private StoreFile.Writer currentWriter
private byte[] currentWriterEndKey
private Cell lastCell
private long cellsInCurrentWriter
private int majorRangeFromIndex
private int majorRangeToIndex
private boolean hasAnyWriter
public StripeMultiFileWriter.BoundaryMultiWriter(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
IOException
private boolean isCellAfterCurrentWriter(Cell cell)
protected void commitWritersInternal() throws IOException
StripeMultiFileWriter
commitWritersInternal
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–2019 The Apache Software Foundation. All rights reserved.