|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter
@InterfaceAudience.Private public abstract class AbstractMultiFileWriter
Base class for cell sink that separates the provided cells into multiple files.
Nested Class Summary | |
---|---|
static interface |
AbstractMultiFileWriter.WriterFactory
|
Field Summary | |
---|---|
protected StoreScanner |
sourceScanner
Source scanner that is tracking KV count; may be null if source is not StoreScanner |
protected AbstractMultiFileWriter.WriterFactory |
writerFactory
Factory that is used to produce single StoreFile.Writer-s |
Constructor Summary | |
---|---|
AbstractMultiFileWriter()
|
Method Summary | |
---|---|
List<org.apache.hadoop.fs.Path> |
abortWriters()
Close all writers without throwing any exceptions. |
List<org.apache.hadoop.fs.Path> |
commitWriters(long maxSeqId,
boolean isMajor)
Commit all writers. |
void |
init(StoreScanner sourceScanner,
AbstractMultiFileWriter.WriterFactory factory)
Initializes multi-writer before usage. |
protected void |
preCloseWriter(StoreFile.Writer writer)
Subclasses override this method to be called before we close the give writer. |
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. |
protected abstract Collection<StoreFile.Writer> |
writers()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.hbase.regionserver.compactions.Compactor.CellSink |
---|
append |
Field Detail |
---|
protected AbstractMultiFileWriter.WriterFactory writerFactory
protected StoreScanner sourceScanner
Constructor Detail |
---|
public AbstractMultiFileWriter()
Method Detail |
---|
public void init(StoreScanner sourceScanner, AbstractMultiFileWriter.WriterFactory factory)
sourceScanner
- Optional store scanner to obtain the information about read progress.factory
- Factory used to produce individual file writers.public List<org.apache.hadoop.fs.Path> commitWriters(long maxSeqId, boolean isMajor) throws IOException
Notice that here we use the same maxSeqId
for all output files since we haven't
find an easy to find enough sequence ids for different output files in some corner cases. See
comments in HBASE-15400 for more details.
IOException
public List<org.apache.hadoop.fs.Path> abortWriters()
protected abstract Collection<StoreFile.Writer> writers()
protected void preCommitWriters() throws IOException
IOException
protected void preCloseWriter(StoreFile.Writer writer) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |