private static class CompactionTool.CompactionWorker extends Object
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private boolean |
deleteCompacted |
private org.apache.hadoop.fs.FileSystem |
fs |
private boolean |
keepCompactedFiles |
private org.apache.hadoop.fs.Path |
tmpDir |
Constructor and Description |
---|
CompactionTool.CompactionWorker(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
void |
compact(org.apache.hadoop.fs.Path path,
boolean compactOnce,
boolean major)
Execute the compaction on the specified path.
|
private void |
compactRegion(org.apache.hadoop.fs.Path tableDir,
HTableDescriptor htd,
org.apache.hadoop.fs.Path regionDir,
boolean compactOnce,
boolean major) |
private void |
compactStoreFiles(org.apache.hadoop.fs.Path tableDir,
HTableDescriptor htd,
HRegionInfo hri,
String familyName,
boolean compactOnce,
boolean major)
Execute the actual compaction job.
|
private void |
compactTable(org.apache.hadoop.fs.Path tableDir,
boolean compactOnce,
boolean major) |
private static HStore |
getStore(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path tableDir,
HTableDescriptor htd,
HRegionInfo hri,
String familyName,
org.apache.hadoop.fs.Path tempDir)
Create a "mock" HStore that uses the tmpDir specified by the user and
the store dir to compact as source.
|
private final boolean keepCompactedFiles
private final boolean deleteCompacted
private final org.apache.hadoop.conf.Configuration conf
private final org.apache.hadoop.fs.FileSystem fs
private final org.apache.hadoop.fs.Path tmpDir
public CompactionTool.CompactionWorker(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf)
public void compact(org.apache.hadoop.fs.Path path, boolean compactOnce, boolean major) throws IOException
path
- Directory path on which to run compaction.compactOnce
- Execute just a single step of compaction.major
- Request major compaction.IOException
private void compactTable(org.apache.hadoop.fs.Path tableDir, boolean compactOnce, boolean major) throws IOException
IOException
private void compactRegion(org.apache.hadoop.fs.Path tableDir, HTableDescriptor htd, org.apache.hadoop.fs.Path regionDir, boolean compactOnce, boolean major) throws IOException
IOException
private void compactStoreFiles(org.apache.hadoop.fs.Path tableDir, HTableDescriptor htd, HRegionInfo hri, String familyName, boolean compactOnce, boolean major) throws IOException
IOException
private static HStore getStore(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tableDir, HTableDescriptor htd, HRegionInfo hri, String familyName, org.apache.hadoop.fs.Path tempDir) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.