in src/main/java/com/netflix/bdp/s3mper/cli/MetastorePathDeleteCommand.java [64:89]
public void execute(Configuration conf, String[] args) throws Exception {
CmdLineParser parser = new CmdLineParser(this);
try {
parser.parseArgument(args);
} catch (CmdLineException e) {
System.err.println(e.getMessage());
System.err.println("java SampleMain [options...] arguments...");
// print the list of available options
parser.printUsage(System.err);
System.err.println();
System.err.println(" Example: s3mper metastore "+parser.printExample(OptionHandlerFilter.ALL));
return;
}
MetastoreJanitor janitor = new MetastoreJanitor();
janitor.initalize(PathUtil.S3N, conf);
janitor.setScanLimit(readUnits);
janitor.setDeleteLimit(writeUnits);
janitor.setScanThreads(scanThreads);
janitor.setDeleteThreads(deleteThreads);
janitor.deletePaths(TimeUnit.valueOf(unitType.toUpperCase()), unitCount);
}