@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(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
TableName tableName,
ColumnFamilyDescriptor column,
ExecutorService pool) |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.hadoop.fs.Path> |
compact(List<org.apache.hadoop.fs.FileStatus> files,
boolean allFiles)
Compacts the candidate mob files.
|
protected List<org.apache.hadoop.fs.Path> |
compactDelFiles(PartitionedMobCompactionRequest 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(PartitionedMobCompactionRequest request)
Compacts the selected small mob files and all the del files.
|
protected List<org.apache.hadoop.fs.Path> |
performCompaction(PartitionedMobCompactionRequest request)
Performs the compaction on the selected files.
|
protected PartitionedMobCompactionRequest |
select(List<org.apache.hadoop.fs.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(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
TableName tableName,
ColumnFamilyDescriptor column,
ExecutorService pool)
throws IOException
IOExceptionpublic List<org.apache.hadoop.fs.Path> compact(List<org.apache.hadoop.fs.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<org.apache.hadoop.fs.FileStatus> candidates, boolean allFiles) throws IOException
candidates - All the candidates.allFiles - Whether add all mob files into the compaction.IOException - if IO failure is encounteredprotected List<org.apache.hadoop.fs.Path> performCompaction(PartitionedMobCompactionRequest request) throws IOException
request - The compaction request.IOException - if IO failure is encounteredprotected List<org.apache.hadoop.fs.Path> compactMobFiles(PartitionedMobCompactionRequest request) throws IOException
request - The compaction request.IOException - if IO failure is encounteredprotected List<org.apache.hadoop.fs.Path> compactDelFiles(PartitionedMobCompactionRequest request, List<org.apache.hadoop.fs.Path> delFilePaths) throws IOException
request - The compaction request.delFilePaths - Del file paths to compactIOException - if IO failure is encounteredCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.