private static List<BackupInfo> getHistory(Configuration conf, Path backupRootPath)
    throws IOException {
    // Get all (n) history from backup root destination

    FileSystem fs = FileSystem.get(backupRootPath.toUri(), conf);
    RemoteIterator<LocatedFileStatus> it = fs.listLocatedStatus(backupRootPath);

    List<BackupInfo> infos = new ArrayList<>();
    while (it.hasNext()) {
      LocatedFileStatus lfs = it.next();

      if (!lfs.isDirectory()) {
        continue;
      }

      String backupId = lfs.getPath().getName();
      try {
        BackupInfo info = loadBackupInfo(backupRootPath, backupId, fs);
        infos.add(info);
      } catch (IOException e) {
        LOG.error("Can not load backup info from: " + lfs.getPath(), e);
      }
    }
    // Sort
    Collections.sort(infos, new Comparator<BackupInfo>() {
      @Override
      public int compare(BackupInfo o1, BackupInfo o2) {
        long ts1 = getTimestamp(o1.getBackupId());
        long ts2 = getTimestamp(o2.getBackupId());

        if (ts1 == ts2) {
          return 0;
        }

        return ts1 < ts2 ? 1 : -1;
      }

      private long getTimestamp(String backupId) {
        return Long.parseLong(Iterators.get(Splitter.on('_').split(backupId).iterator(), 1));
      }
    });
    return infos;
  }
Given the backup root dir and the backup id, return the log file location for an incremental
backup.
@param backupRootDir backup root directory
@param backupId      backup id
@return logBackupDir: ".../user/biadmin/backup1/WALs/backup_1396650096738"
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java