Package org.apache.hadoop.hive.shims

Examples of org.apache.hadoop.hive.shims.HadoopShims.moveToAppropriateTrash()


      Configuration conf) throws MetaException {
    LOG.info("deleting  " + f);
    HadoopShims hadoopShim = ShimLoader.getHadoopShims();

    try {
      if (hadoopShim.moveToAppropriateTrash(fs, f, conf)) {
        LOG.info("Moved to trash: " + f);
        return true;
      }

      if (fs.delete(f, true)) {
View Full Code Here


   */
  public static boolean moveToTrash(FileSystem fs, Path f, Configuration conf) throws IOException {
    LOG.info("deleting  " + f);
    HadoopShims hadoopShim = ShimLoader.getHadoopShims();

    if (hadoopShim.moveToAppropriateTrash(fs, f, conf)) {
      LOG.info("Moved to trash: " + f);
      return true;
    }

    boolean result = fs.delete(f, true);
View Full Code Here

    HadoopShims hadoopShim = ShimLoader.getHadoopShims();

    try {
      if (ifPurge) {
        LOG.info("Not moving "+ f +" to trash");
      } else if (hadoopShim.moveToAppropriateTrash(fs, f, conf)) {
        LOG.info("Moved to trash: " + f);
        return true;
      }

      if (fs.delete(f, true)) {
View Full Code Here

      Configuration conf) throws MetaException {
    LOG.info("deleting  " + f);
    HadoopShims hadoopShim = ShimLoader.getHadoopShims();

    try {
      if (hadoopShim.moveToAppropriateTrash(fs, f, conf)) {
        LOG.info("Moved to trash: " + f);
        return true;
      }

      if (fs.delete(f, true)) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.