Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.Trash$Emptier


    myMetrics = new NameNodeMetrics(conf, this);

    this.namesystem = new FSNamesystem(this, conf);
    this.server.start()//start RPC server  

    this.emptier = new Thread(new Trash(conf).getEmptier(), "Trash Emptier");
    this.emptier.setDaemon(true);
    this.emptier.start();
  }
View Full Code Here


    this.server.start()//start RPC server  
    startTrashEmptier(conf);
  }

  private void startTrashEmptier(Configuration conf) throws IOException {
    this.emptier = new Thread(new Trash(conf).getEmptier(), "Trash Emptier");
    this.emptier.setDaemon(true);
    this.emptier.start();
  }
View Full Code Here

    try {
      this.namesystem = new FSNamesystem(this.nameNodeAddress.getHostName(), this.nameNodeAddress.getPort(), this, conf);
      this.server.start()//start RPC server  
 
      this.emptier = new Thread(new Trash(conf).getEmptier(), "Trash Emptier");
      this.emptier.setDaemon(true);
      this.emptier.start();
    } catch (IOException e) {
      this.server.stop();
      throw e;
View Full Code Here

    log.info("offline: " + offline);
    log.info("verbose: " + verbose);
    log.info("memory threshold: " + CANDIDATE_MEMORY_PERCENTAGE + " of " + Runtime.getRuntime().maxMemory() + " bytes");
    log.info("delete threads: " + numDeleteThreads);
    if (!noTrash) {
      this.trash = new Trash(fs, fs.getConf());
    }
  }
View Full Code Here

         
          rename(fs, tmpDatafile, newDatafile);
         
          // start deleting files, if we do not finish they will be cleaned
          // up later
          Trash trash = new Trash(fs, fs.getConf());
          for (Path path : oldDatafiles) {
            Path deleteFile = new Path(location + "/delete+" + compactName + "+" + path.getName());
            if (acuTableConf.getBoolean(Property.GC_TRASH_IGNORE) || !trash.moveToTrash(deleteFile))
              fs.delete(deleteFile, true);
          }
        }
       
        // atomically remove old files and add new file
View Full Code Here

            log.info("Archiving walog " + source + " to " + dest);
            if (!fs.rename(new Path(source), new Path(dest)))
              log.error("rename is unsuccessful");
          } else {
            log.info("Deleting walog " + filename);
            Trash trash = new Trash(fs, fs.getConf());
            Path sourcePath = new Path(source);
            if (!(!acuConf.getBoolean(Property.GC_TRASH_IGNORE) && trash.moveToTrash(sourcePath)) && !fs.delete(sourcePath, true))
              log.warn("Failed to delete walog " + source);
            Path recoveryPath = new Path(Constants.getRecoveryDir(acuConf), filename);
            try {
              if (trash.moveToTrash(recoveryPath) || fs.delete(recoveryPath, true))
                log.info("Deleted any recovery log " + filename);
            } catch (FileNotFoundException ex) {
              // ignore
            }
           
View Full Code Here

 
  GarbageCollectWriteAheadLogs(Instance instance, FileSystem fs, boolean noTrash) throws IOException {
    this.instance = instance;
    this.fs = fs;
    if (!noTrash)
      this.trash = new Trash(fs, fs.getConf());
  }
View Full Code Here

  private void startTrashEmptier(Configuration conf) throws IOException {
    if (conf.getInt("fs.trash.interval", 0) == 0) {
      return;
    }
    FileSystem fs = NameNode.getTrashFileSystem(conf);
    this.trash = new Trash(fs, conf);
    this.emptier = new Thread(trash.getEmptier(), "Trash Emptier");
    this.emptier.setDaemon(true);
    this.emptier.start();
  }
View Full Code Here

    log.info("verbose: " + verbose);
    log.info("trash enabled: " + !noTrash);
    log.info("memory threshold: " + CANDIDATE_MEMORY_PERCENTAGE + " of " + Runtime.getRuntime().maxMemory() + " bytes");
    log.info("delete threads: " + numDeleteThreads);
    if (!noTrash) {
      this.trash = new Trash(fs, fs.getConf());
    }
  }
View Full Code Here

    }
  }
 
  public CoordinateRecoveryTask(FileSystem fs) throws IOException {
    this.fs = fs;
    this.trash = new Trash(fs, fs.getConf());
    zcache = new ZooCache();
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.Trash$Emptier

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.