protected void trashEmptier(FileSystem fs, Configuration conf) throws Exception {
// Trash with 12 second deletes and 6 seconds checkpoints
conf.set("fs.trash.interval", "0.2"); // 12 seconds
conf.set("fs.trash.checkpoint.interval", "0.1"); // 6 seconds
Trash trash = new Trash(conf);
// clean up trash can
fs.delete(trash.getCurrentTrashDir().getParent(), true);
// Start Emptier in background
Runnable emptier = trash.getEmptier();
Thread emptierThread = new Thread(emptier);
emptierThread.start();
FsShell shell = new FsShell();
shell.setConf(conf);