org.apache.hadoop.hbase.regionserver
Class StripeMultiFileWriter.SizeMultiWriter
java.lang.Object
org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter
org.apache.hadoop.hbase.regionserver.StripeMultiFileWriter.SizeMultiWriter
- All Implemented Interfaces:
- Compactor.CellSink
- Enclosing class:
- StripeMultiFileWriter
public static class StripeMultiFileWriter.SizeMultiWriter
- extends StripeMultiFileWriter
MultiWriter that separates the cells based on target cell number per file and file count. New
file is started every time the target number of KVs is reached, unless the fixed count of
writers has already been created (in that case all the remaining KVs go into the last writer).
Method Summary |
void |
append(KeyValue kv)
|
protected void |
preCommitWriters()
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lastRowInCurrentWriter
protected byte[] lastRowInCurrentWriter
StripeMultiFileWriter.SizeMultiWriter
public StripeMultiFileWriter.SizeMultiWriter(KeyValue.KVComparator comparator,
int targetCount,
long targetKvs,
byte[] left,
byte[] right)
- Parameters:
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.
append
public void append(KeyValue kv)
throws IOException
- Throws:
IOException
preCommitWriters
protected void preCommitWriters()
throws IOException
- Description copied from class:
AbstractMultiFileWriter
- 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.
- Overrides:
preCommitWriters
in class AbstractMultiFileWriter
- Throws:
IOException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.