Java Code Examples for org.apache.hadoop.fs.Trash#expunge()

The following examples show how to use org.apache.hadoop.fs.Trash#expunge() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Delete.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
protected void processArguments(LinkedList<PathData> args)
throws IOException {
  Trash trash = new Trash(getConf());
  trash.expunge();
  trash.checkpoint();    
}
 
Example 2
Source File: ShardWriter.java    From linden with Apache License 2.0 5 votes vote down vote up
public static void moveToTrash(Configuration conf, Path path) throws IOException {
  Trash t = new Trash(conf);
  boolean isMoved = t.moveToTrash(path);
  t.expunge();
  if (!isMoved) {
    logger.error("Trash is not enabled or file is already in the trash.");
  }
}
 
Example 3
Source File: Delete.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
protected void processArguments(LinkedList<PathData> args)
throws IOException {
  Trash trash = new Trash(getConf());
  trash.expunge();
  trash.checkpoint();    
}