public static class StripeMultiFileWriter.BoundaryMultiWriter extends StripeMultiFileWriter
StripeMultiFileWriter.BoundaryMultiWriter, StripeMultiFileWriter.SizeMultiWriterAbstractMultiFileWriter.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, existingWriterssourceScanner, 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, writersabortWriters, beforeShipped, commitWriters, commitWriters, initprivate 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).IOExceptionpublic void append(Cell cell) throws IOException
CellSinkcell - the cell to be addedIOExceptionprivate boolean isCellAfterCurrentWriter(Cell cell)
protected void preCommitWritersInternal() throws IOException
preCommitWritersInternal in class StripeMultiFileWriterIOExceptionprivate void prepareWriterFor(Cell cell) throws IOException
IOExceptionprivate void createEmptyWriter() throws IOException
IOExceptionprivate void checkCanCreateWriter() throws IOException
IOExceptionprivate void stopUsingCurrentWriter()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.