Class CompactionTool
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.regionserver.CompactionTool
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
@LimitedPrivate("Tools")
public class CompactionTool
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classInput format that uses store files block location as input split locality.private static classprivate static classClass responsible to execute the Compaction on the specified path. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intdoClient(org.apache.hadoop.fs.FileSystem fs, Set<org.apache.hadoop.fs.Path> toCompactDirs, boolean compactOnce, boolean major) Execute compaction, from this client, one path at the time.private intdoMapReduce(org.apache.hadoop.fs.FileSystem fs, Set<org.apache.hadoop.fs.Path> toCompactDirs, boolean compactOnce, boolean major) Execute compaction, using a Map-Reduce job.private static booleanisFamilyDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) private static booleanisRegionDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) private static booleanisTableDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) static voidprivate voidprivate voidprintUsage(String message) intMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Field Details
-
LOG
-
CONF_COMPACT_ONCE
- See Also:
-
CONF_COMPACT_MAJOR
- See Also:
-
CONF_DELETE_COMPACTED
- See Also:
-
-
Constructor Details
-
CompactionTool
public CompactionTool()
-
-
Method Details
-
isRegionDir
private static boolean isRegionDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
isTableDir
private static boolean isTableDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
isFamilyDir
private static boolean isFamilyDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-
doMapReduce
private int doMapReduce(org.apache.hadoop.fs.FileSystem fs, Set<org.apache.hadoop.fs.Path> toCompactDirs, boolean compactOnce, boolean major) throws Exception Execute compaction, using a Map-Reduce job.- Throws:
Exception
-
doClient
private int doClient(org.apache.hadoop.fs.FileSystem fs, Set<org.apache.hadoop.fs.Path> toCompactDirs, boolean compactOnce, boolean major) throws IOException Execute compaction, from this client, one path at the time.- Throws:
IOException
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
Exception
-
printUsage
-
printUsage
-
main
- Throws:
Exception
-