Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.TrashPolicy


    return true;
  }

  @Override
  public Path getCurrentTrashPath(Configuration conf, FileSystem fs) {
    TrashPolicy tp = TrashPolicy.getInstance(conf, fs, fs.getHomeDirectory());
    return tp.getCurrentTrashDir();
  }
View Full Code Here


      createFile(fs, file2);
      System.out.println("testFileCreationDeleteParent: "
          + "Created file " + file2);
      fs.delete(file2, true);

      TrashPolicy trashPolicy = TrashPolicy.getInstance(conf, fs, fs.getHomeDirectory());
      Path trashRoot = trashPolicy.getCurrentTrashDir();
      TestTrash.checkTrash(fs, trashRoot, file1);
      TestTrash.checkNotInTrash(fs, trashRoot, file2.toString());
    } finally {
      fs.close();
      cluster.shutdown();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.TrashPolicy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.