Search in sources :

Example 1 with WriterFactory

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);
}
Also used : WriterFactory(org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter.WriterFactory) StoreScanner(org.apache.hadoop.hbase.regionserver.StoreScanner)

Aggregations

WriterFactory (org.apache.hadoop.hbase.regionserver.AbstractMultiFileWriter.WriterFactory)1 StoreScanner (org.apache.hadoop.hbase.regionserver.StoreScanner)1