use of org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter.WriterFactory in project hbase by apache.
the class AbstractMultiOutputCompactor method initMultiWriter.
protected void initMultiWriter(AbstractMultiFileWriter writer, InternalScanner scanner, final FileDetails fd, final boolean shouldDropBehind) {
WriterFactory writerFactory = new WriterFactory() {
@Override
public StoreFileWriter createWriter() throws IOException {
return createTmpWriter(fd, shouldDropBehind);
}
};
// Prepare multi-writer, and perform the compaction using scanner and writer.
// It is ok here if storeScanner is null.
StoreScanner storeScanner = (scanner instanceof StoreScanner) ? (StoreScanner) scanner : null;
writer.init(storeScanner, writerFactory);
}
Aggregations