public static Long getCreationTime(Path p) throws IOException {
    int idx = p.getName().lastIndexOf(LOGNAME_SEPARATOR);
    if (idx < 0) {
      throw new IOException("Cannot parse timestamp from path " + p);
    }
    String ts = p.getName().substring(idx + 1);
    return Long.parseLong(ts);
  }
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