public List<BackupInfo> getHistory(int n) throws IOException {
    List<BackupInfo> history = getBackupHistory();
    if (n == -1 || history.size() <= n) {
      return history;
    }
    return Collections.unmodifiableList(history.subList(0, n));
  }
Get first n backup history records
@param n number of records, if n== -1 - max number is ignored
@return list of records
@throws IOException if getting the backup history fails
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupSystemTable.java