public static void main(String[] args) throws Exception { System.exit(ToolRunner.run(HBaseConfiguration.create(), new CompactionTool(), args)); } }
boolean mapred = false; Configuration conf = getConf(); FileSystem fs = FileSystem.get(conf); FileStatus status = fs.getFileStatus(path); if (!status.isDirectory()) { printUsage("Specified path is not a directory. path=" + path); return 1; printUsage(); printUsage(e.getMessage()); return 1; printUsage("No directories to compact specified."); return 1; return doMapReduce(fs, toCompactDirs, compactOnce, major); } else { return doClient(fs, toCompactDirs, compactOnce, major);
private static boolean isFamilyDir(final FileSystem fs, final Path path) throws IOException { return isRegionDir(fs, path.getParent()); }
/** * Execute compaction, from this client, one path at the time. */ private int doClient(final FileSystem fs, final Set<Path> toCompactDirs, final boolean compactOnce, final boolean major) throws IOException { CompactionWorker worker = new CompactionWorker(fs, getConf()); for (Path path: toCompactDirs) { worker.compact(path, compactOnce, major); } return 0; }
private void printUsage() { printUsage(null); }
Configuration conf = getConf(); conf.setBoolean(CONF_COMPACT_ONCE, compactOnce); conf.setBoolean(CONF_COMPACT_MAJOR, major);
private void printUsage() { printUsage(null); }
boolean mapred = false; Configuration conf = getConf(); FileSystem fs = FileSystem.get(conf); FileStatus status = fs.getFileStatus(path); if (!status.isDirectory()) { printUsage("Specified path is not a directory. path=" + path); return 1; printUsage(); printUsage(e.getMessage()); return 1; printUsage("No directories to compact specified."); return 1; return doMapReduce(fs, toCompactDirs, compactOnce, major); } else { return doClient(fs, toCompactDirs, compactOnce, major);
/** * Execute compaction, from this client, one path at the time. */ private int doClient(final FileSystem fs, final Set<Path> toCompactDirs, final boolean compactOnce, final boolean major) throws IOException { CompactionWorker worker = new CompactionWorker(fs, getConf()); for (Path path: toCompactDirs) { worker.compact(path, compactOnce, major); } return 0; }
public static void main(String[] args) throws Exception { System.exit(ToolRunner.run(HBaseConfiguration.create(), new CompactionTool(), args)); } }
private void printUsage() { printUsage(null); }
private static boolean isFamilyDir(final FileSystem fs, final Path path) throws IOException { return isRegionDir(fs, path.getParent()); }
boolean mapred = false; Configuration conf = getConf(); FileSystem fs = FileSystem.get(conf); FileStatus status = fs.getFileStatus(path); if (!status.isDirectory()) { printUsage("Specified path is not a directory. path=" + path); return 1; printUsage(); printUsage(e.getMessage()); return 1; printUsage("No directories to compact specified."); return 1; return doMapReduce(fs, toCompactDirs, compactOnce, major); } else { return doClient(fs, toCompactDirs, compactOnce, major);
/** * Execute compaction, from this client, one path at the time. */ private int doClient(final FileSystem fs, final Set<Path> toCompactDirs, final boolean compactOnce) throws IOException { CompactionWorker worker = new CompactionWorker(fs, getConf()); for (Path path: toCompactDirs) { worker.compact(path, compactOnce); } return 0; }
public static void main(String[] args) throws Exception { System.exit(ToolRunner.run(HBaseConfiguration.create(), new CompactionTool(), args)); } }
private void printUsage() { printUsage(null); }
private static boolean isFamilyDir(final FileSystem fs, final Path path) throws IOException { return isRegionDir(fs, path.getParent()); }
boolean mapred = false; Configuration conf = getConf(); FileSystem fs = FileSystem.get(conf); FileStatus status = fs.getFileStatus(path); if (!status.isDirectory()) { printUsage("Specified path is not a directory. path=" + path); return 1; printUsage(); printUsage(e.getMessage()); return 1; printUsage("No directories to compact specified."); return 1; return doMapReduce(fs, toCompactDirs, compactOnce, major); } else { return doClient(fs, toCompactDirs, compactOnce, major);
/** * Execute compaction, from this client, one path at the time. */ private int doClient(final FileSystem fs, final Set<Path> toCompactDirs, final boolean compactOnce, final boolean major) throws IOException { CompactionWorker worker = new CompactionWorker(fs, getConf()); for (Path path: toCompactDirs) { worker.compact(path, compactOnce, major); } return 0; }
public static void main(String[] args) throws Exception { System.exit(ToolRunner.run(HBaseConfiguration.create(), new CompactionTool(), args)); } }