@InterfaceAudience.Private public class DefaultMobStoreCompactor extends DefaultCompactor
Compactor.CellSinkFactory<S>, Compactor.FileDetails, Compactor.InternalScannerFactory
Modifier and Type | Field and Description |
---|---|
(package private) static ThreadLocal<Boolean> |
disableIO |
protected boolean |
ioOptimizedMode |
private static org.slf4j.Logger |
LOG |
(package private) static ThreadLocal<HashMap<String,Long>> |
mobLengthMap |
(package private) static ThreadLocal<org.apache.hbase.thirdparty.com.google.common.collect.SetMultimap<TableName,String>> |
mobRefSet |
protected long |
mobSizeThreshold |
protected HMobStore |
mobStore |
private Compactor.InternalScannerFactory |
scannerFactory |
(package private) static ThreadLocal<Boolean> |
userRequest |
private Compactor.CellSinkFactory<StoreFileWriter> |
writerFactory |
COMPACTION_PROGRESS_LOG_INTERVAL, compactionKVMax, conf, defaultScannerFactory, dropCacheMajor, dropCacheMinor, keepSeqIdPeriod, MAJOR_COMPACTION_DROP_CACHE, majorCompactionCompression, MINOR_COMPACTION_DROP_CACHE, minorCompactionCompression, store
Constructor and Description |
---|
DefaultMobStoreCompactor(org.apache.hadoop.conf.Configuration conf,
HStore store) |
Modifier and Type | Method and Description |
---|---|
private void |
calculateMobLengthMap(org.apache.hbase.thirdparty.com.google.common.collect.SetMultimap<TableName,String> mobRefs) |
private void |
clearThreadLocals() |
private void |
commitOrAbortMobWriter(StoreFileWriter mobFileWriter,
long maxSeqId,
long mobCells,
boolean major) |
protected List<org.apache.hadoop.fs.Path> |
commitWriter(StoreFileWriter writer,
Compactor.FileDetails fd,
CompactionRequestImpl request) |
List<org.apache.hadoop.fs.Path> |
compact(CompactionRequestImpl request,
ThroughputController throughputController,
User user)
Do a minor/major compaction on an explicit set of storefiles from a Store.
|
protected String |
getStoreInfo() |
private StoreFileWriter |
newMobWriter(Compactor.FileDetails fd,
boolean major,
Consumer<org.apache.hadoop.fs.Path> writerCreationTracker) |
protected boolean |
performCompaction(Compactor.FileDetails fd,
InternalScanner scanner,
CellSink writer,
long smallestReadPoint,
boolean cleanSeqId,
ThroughputController throughputController,
CompactionRequestImpl request,
CompactionProgress progress)
Performs compaction on a column family with the mob flag enabled.
|
abortWriter
compact, createParams, createScanner, createScanner, createWriter, createWriter, getProgress, isCompacting
private static final org.slf4j.Logger LOG
protected long mobSizeThreshold
protected boolean ioOptimizedMode
static ThreadLocal<org.apache.hbase.thirdparty.com.google.common.collect.SetMultimap<TableName,String>> mobRefSet
static ThreadLocal<Boolean> userRequest
static ThreadLocal<Boolean> disableIO
static ThreadLocal<HashMap<String,Long>> mobLengthMap
private final Compactor.InternalScannerFactory scannerFactory
private final Compactor.CellSinkFactory<StoreFileWriter> writerFactory
public DefaultMobStoreCompactor(org.apache.hadoop.conf.Configuration conf, HStore store)
public List<org.apache.hadoop.fs.Path> compact(CompactionRequestImpl request, ThroughputController throughputController, User user) throws IOException
DefaultCompactor
compact
in class DefaultCompactor
IOException
private void calculateMobLengthMap(org.apache.hbase.thirdparty.com.google.common.collect.SetMultimap<TableName,String> mobRefs) throws IOException
mobRefs
- multimap of original table name -> mob hfileIOException
protected boolean performCompaction(Compactor.FileDetails fd, InternalScanner scanner, CellSink writer, long smallestReadPoint, boolean cleanSeqId, ThroughputController throughputController, CompactionRequestImpl request, CompactionProgress progress) throws IOException
performCompaction
in class Compactor<StoreFileWriter>
fd
- File detailsscanner
- Where to read from.writer
- Where to write to.smallestReadPoint
- Smallest read point.cleanSeqId
- When true, remove seqId(used to be mvcc) value which is <=
smallestReadPointthroughputController
- The compaction throughput controller.request
- compaction request.progress
- Progress reporter.IOException
protected String getStoreInfo()
private void clearThreadLocals()
private StoreFileWriter newMobWriter(Compactor.FileDetails fd, boolean major, Consumer<org.apache.hadoop.fs.Path> writerCreationTracker) throws IOException
IOException
private void commitOrAbortMobWriter(StoreFileWriter mobFileWriter, long maxSeqId, long mobCells, boolean major) throws IOException
IOException
protected List<org.apache.hadoop.fs.Path> commitWriter(StoreFileWriter writer, Compactor.FileDetails fd, CompactionRequestImpl request) throws IOException
commitWriter
in class DefaultCompactor
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.