@InterfaceAudience.Private public class PartitionedMobFileCompactor extends MobFileCompactor
MobFileCompactor 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 |
|---|
PartitionedMobFileCompactor(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
TableName tableName,
HColumnDescriptor column,
ExecutorService pool) |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.hadoop.fs.Path> |
compact(List<org.apache.hadoop.fs.FileStatus> files,
boolean isForceAllFiles)
Compacts the candidate mob files.
|
protected List<org.apache.hadoop.fs.Path> |
compactDelFiles(PartitionedMobFileCompactionRequest request,
List<org.apache.hadoop.fs.Path> delFilePaths)
Compacts the del files in batches which avoids opening too many files.
|
protected List<org.apache.hadoop.fs.Path> |
compactMobFiles(PartitionedMobFileCompactionRequest request,
List<StoreFile> delFiles)
Compacts the selected small mob files and all the del files.
|
protected List<org.apache.hadoop.fs.Path> |
performCompaction(PartitionedMobFileCompactionRequest request)
Performs the compaction on the selected files.
|
protected PartitionedMobFileCompactionRequest |
select(List<org.apache.hadoop.fs.FileStatus> candidates,
boolean isForceAllFiles)
Selects the compacted mob/del files.
|
compact, compactprotected long mergeableSize
protected int delFileMaxCount
protected int compactionBatchSize
protected int compactionKVMax
public PartitionedMobFileCompactor(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
TableName tableName,
HColumnDescriptor column,
ExecutorService pool)
public List<org.apache.hadoop.fs.Path> compact(List<org.apache.hadoop.fs.FileStatus> files, boolean isForceAllFiles) throws IOException
MobFileCompactorcompact in class MobFileCompactorfiles - The candidate mob files.isForceAllFiles - Whether add all mob files into the compaction.IOExceptionprotected PartitionedMobFileCompactionRequest select(List<org.apache.hadoop.fs.FileStatus> candidates, boolean isForceAllFiles) throws IOException
candidates - All the candidates.isForceAllFiles - Whether add all mob files into the compaction.IOExceptionprotected List<org.apache.hadoop.fs.Path> performCompaction(PartitionedMobFileCompactionRequest request) throws IOException
request - The compaction request.IOExceptionprotected List<org.apache.hadoop.fs.Path> compactMobFiles(PartitionedMobFileCompactionRequest request, List<StoreFile> delFiles) throws IOException
request - The compaction request.delFiles - The del files.IOExceptionprotected List<org.apache.hadoop.fs.Path> compactDelFiles(PartitionedMobFileCompactionRequest request, List<org.apache.hadoop.fs.Path> delFilePaths) throws IOException
request - The compaction request.delFilePaths - IOExceptionCopyright © 2007–2016 Cloudera. All rights reserved.