Example #1
0
  protected void download(Iterator<AbstractBackupPath> fsIterator, BackupFileType filter, int lastN)
      throws Exception {
    if (fsIterator == null) return;

    BoundedList bl = new BoundedList(lastN);
    while (fsIterator.hasNext()) {
      AbstractBackupPath temp = fsIterator.next();
      if (temp.type == BackupFileType.SST && tracker.contains(temp)) continue;

      if (temp.getType() == filter) {
        bl.add(temp);
      }
    }

    download(bl.iterator(), filter);
  }
Example #2
0
  protected void download(Iterator<AbstractBackupPath> fsIterator, BackupFileType filter)
      throws Exception {
    while (fsIterator.hasNext()) {
      AbstractBackupPath temp = fsIterator.next();
      if (temp.type == BackupFileType.SST && tracker.contains(temp)) continue;

      if (temp.getType() == filter) {
        File localFileHandler = temp.newRestoreFile();
        logger.debug(
            "Created local file name: %s",
            localFileHandler.getAbsolutePath() + File.pathSeparator + localFileHandler.getName());
        download(temp, localFileHandler);
      }
    }
    waitToComplete();
  }