Class CompactionTool.CompactionWorker
java.lang.Object
org.apache.hadoop.hbase.regionserver.CompactionTool.CompactionWorker
- Enclosing class:
- CompactionTool
Class responsible to execute the Compaction on the specified path. The path can be a table,
 region or family directory.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configurationprivate final booleanprivate final org.apache.hadoop.fs.FileSystem
- 
Constructor SummaryConstructorsConstructorDescriptionCompactionWorker(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidcompact(org.apache.hadoop.fs.Path path, boolean compactOnce, boolean major) Execute the compaction on the specified path.private voidcompactRegion(org.apache.hadoop.fs.Path tableDir, TableDescriptor htd, org.apache.hadoop.fs.Path regionDir, boolean compactOnce, boolean major) private voidcompactStoreFiles(org.apache.hadoop.fs.Path tableDir, TableDescriptor htd, RegionInfo hri, String familyName, boolean compactOnce, boolean major) Execute the actual compaction job.private voidcompactTable(org.apache.hadoop.fs.Path tableDir, boolean compactOnce, boolean major) private static HStoregetStore(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tableDir, TableDescriptor htd, RegionInfo hri, String familyName) 
- 
Field Details- 
deleteCompacted
- 
conf
- 
fs
 
- 
- 
Constructor Details- 
CompactionWorkerpublic CompactionWorker(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) 
 
- 
- 
Method Details- 
compactpublic void compact(org.apache.hadoop.fs.Path path, boolean compactOnce, boolean major) throws IOException Execute the compaction on the specified path.- Parameters:
- path- Directory path on which to run compaction.
- compactOnce- Execute just a single step of compaction.
- major- Request major compaction.
- Throws:
- IOException
 
- 
compactTableprivate void compactTable(org.apache.hadoop.fs.Path tableDir, boolean compactOnce, boolean major) throws IOException - Throws:
- IOException
 
- 
compactRegionprivate void compactRegion(org.apache.hadoop.fs.Path tableDir, TableDescriptor htd, org.apache.hadoop.fs.Path regionDir, boolean compactOnce, boolean major) throws IOException - Throws:
- IOException
 
- 
compactStoreFilesprivate void compactStoreFiles(org.apache.hadoop.fs.Path tableDir, TableDescriptor htd, RegionInfo hri, String familyName, boolean compactOnce, boolean major) throws IOException Execute the actual compaction job. If the compact once flag is not specified, execute the compaction until no more compactions are needed. Uses the Configuration settings provided.- Throws:
- IOException
 
- 
getStoreprivate static HStore getStore(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path tableDir, TableDescriptor htd, RegionInfo hri, String familyName) throws IOException - Throws:
- IOException
 
 
-