public static List<String> getFiles(FileSystem fs, Path rootDir, List<String> files,
    PathFilter filter) throws IOException {
    RemoteIterator<LocatedFileStatus> it = fs.listFiles(rootDir, true);

    while (it.hasNext()) {
      LocatedFileStatus lfs = it.next();
      if (lfs.isDirectory()) {
        continue;
      }
      // apply filter
      if (filter.accept(lfs.getPath())) {
        files.add(lfs.getPath().toString());
      }
    }
    return files;
  }
Given the log file, parse the timestamp from the file name. The timestamp is the last number.
@param p a path to the log file
@return the timestamp
@throws IOException exception
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java