@InterfaceAudience.LimitedPrivate(value="Tools") public class CompactionTool extends org.apache.hadoop.conf.Configured implements org.apache.hadoop.util.Tool
Modifier and Type | Class and Description |
---|---|
private static class |
CompactionTool.CompactionInputFormat
Input format that uses store files block location as input split locality.
|
private static class |
CompactionTool.CompactionMapper |
private static class |
CompactionTool.CompactionWorker
Class responsible to execute the Compaction on the specified path.
|
Modifier and Type | Field and Description |
---|---|
private static String |
CONF_COMPACT_MAJOR |
private static String |
CONF_COMPACT_ONCE |
private static String |
CONF_DELETE_COMPACTED |
private static String |
CONF_TMP_DIR |
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
CompactionTool() |
Modifier and Type | Method and Description |
---|---|
private int |
doClient(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 int |
doMapReduce(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 boolean |
isFamilyDir(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path) |
private static boolean |
isRegionDir(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path) |
private static boolean |
isTableDir(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path) |
static void |
main(String[] args) |
private void |
printUsage() |
private void |
printUsage(String message) |
int |
run(String[] args) |
private static final org.slf4j.Logger LOG
private static final String CONF_TMP_DIR
private static final String CONF_COMPACT_ONCE
private static final String CONF_COMPACT_MAJOR
private static final String CONF_DELETE_COMPACTED
public CompactionTool()
private static boolean isRegionDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
IOException
private static boolean isTableDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
IOException
private static boolean isFamilyDir(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
IOException
private int doMapReduce(org.apache.hadoop.fs.FileSystem fs, Set<org.apache.hadoop.fs.Path> toCompactDirs, boolean compactOnce, boolean major) throws Exception
Exception
private int doClient(org.apache.hadoop.fs.FileSystem fs, Set<org.apache.hadoop.fs.Path> toCompactDirs, boolean compactOnce, boolean major) throws IOException
IOException
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
private void printUsage()
private void printUsage(String message)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.