@InterfaceAudience.Private public class PartitionedMobCompactor extends MobCompactor
MobCompactor that compacts the mob files in partitions.| Modifier and Type | Field and Description |
|---|---|
protected int |
compactionBatchSize
The number of files compacted in a batch
|
protected int |
compactionKVMax |
protected int |
delFileMaxCount |
protected long |
mergeableSize |
column, conf, fs, mobFamilyDir, mobTableDir, pool, tableName| Constructor and Description |
|---|
PartitionedMobCompactor(Configuration conf,
FileSystem fs,
TableName tableName,
HColumnDescriptor column,
java.util.concurrent.ExecutorService pool) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Path> |
compact(java.util.List<FileStatus> files,
boolean allFiles)
Compacts the candidate mob files.
|
protected java.util.List<Path> |
compactDelFiles(PartitionedMobCompactionRequest request,
java.util.List<Path> delFilePaths)
Compacts the del files in batches which avoids opening too many files.
|
protected java.util.List<Path> |
compactMobFiles(PartitionedMobCompactionRequest request,
java.util.List<StoreFile> delFiles)
Compacts the selected small mob files and all the del files.
|
protected java.util.List<Path> |
performCompaction(PartitionedMobCompactionRequest request)
Performs the compaction on the selected files.
|
protected PartitionedMobCompactionRequest |
select(java.util.List<FileStatus> candidates,
boolean allFiles)
Selects the compacted mob/del files.
|
compact, compactprotected long mergeableSize
protected int delFileMaxCount
protected int compactionBatchSize
protected int compactionKVMax
public PartitionedMobCompactor(Configuration conf,
FileSystem fs,
TableName tableName,
HColumnDescriptor column,
java.util.concurrent.ExecutorService pool)
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<Path> compact(java.util.List<FileStatus> files,
boolean allFiles)
throws java.io.IOException
MobCompactorcompact in class MobCompactorfiles - The candidate mob files.allFiles - Whether add all mob files into the compaction.java.io.IOExceptionprotected PartitionedMobCompactionRequest select(java.util.List<FileStatus> candidates, boolean allFiles) throws java.io.IOException
candidates - All the candidates.allFiles - Whether add all mob files into the compaction.java.io.IOExceptionprotected java.util.List<Path> performCompaction(PartitionedMobCompactionRequest request) throws java.io.IOException
request - The compaction request.java.io.IOExceptionprotected java.util.List<Path> compactMobFiles(PartitionedMobCompactionRequest request, java.util.List<StoreFile> delFiles) throws java.io.IOException
request - The compaction request.delFiles - The del files.java.io.IOExceptionprotected java.util.List<Path> compactDelFiles(PartitionedMobCompactionRequest request, java.util.List<Path> delFilePaths) throws java.io.IOException
request - The compaction request.delFilePaths - java.io.IOException