@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,
                       ExecutorService pool)  | 
| Modifier and Type | Method and Description | 
|---|---|
List<Path> | 
compact(List<FileStatus> files,
       boolean allFiles)
Compacts the candidate mob files. 
 | 
protected List<Path> | 
compactDelFiles(PartitionedMobCompactionRequest request,
               List<Path> delFilePaths)
Compacts the del files in batches which avoids opening too many files. 
 | 
protected List<Path> | 
compactMobFiles(PartitionedMobCompactionRequest request,
               List<StoreFile> delFiles)
Compacts the selected small mob files and all the del files. 
 | 
protected List<Path> | 
performCompaction(PartitionedMobCompactionRequest request)
Performs the compaction on the selected files. 
 | 
protected PartitionedMobCompactionRequest | 
select(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,
                               ExecutorService pool)
                        throws IOException
IOExceptionpublic List<Path> compact(List<FileStatus> files, boolean allFiles) throws IOException
MobCompactorcompact in class MobCompactorfiles - The candidate mob files.allFiles - Whether add all mob files into the compaction.IOExceptionprotected PartitionedMobCompactionRequest select(List<FileStatus> candidates, boolean allFiles) throws IOException
candidates - All the candidates.allFiles - Whether add all mob files into the compaction.IOExceptionprotected List<Path> performCompaction(PartitionedMobCompactionRequest request) throws IOException
request - The compaction request.IOExceptionprotected List<Path> compactMobFiles(PartitionedMobCompactionRequest request, List<StoreFile> delFiles) throws IOException
request - The compaction request.delFiles - The del files.IOExceptionprotected List<Path> compactDelFiles(PartitionedMobCompactionRequest request, List<Path> delFilePaths) throws IOException
request - The compaction request.delFilePaths - IOException