Search in sources :

Example 1 with BackupState

use of org.apache.hadoop.hbase.backup.BackupInfo.BackupState in project hbase by apache.

the class BackupSystemTable method getBackupHistory.

/**
   * Get all completed backup information (in desc order by time)
   * @param onlyCompleted true, if only successfully completed sessions
   * @return history info of BackupCompleteData
   * @throws IOException exception
   */
public ArrayList<BackupInfo> getBackupHistory(boolean onlyCompleted) throws IOException {
    if (LOG.isTraceEnabled()) {
        LOG.trace("get backup history from backup system table");
    }
    ArrayList<BackupInfo> list;
    BackupState state = onlyCompleted ? BackupState.COMPLETE : BackupState.ANY;
    list = getBackupInfos(state);
    return BackupUtils.sortHistoryListDesc(list);
}
Also used : BackupInfo(org.apache.hadoop.hbase.backup.BackupInfo) BackupState(org.apache.hadoop.hbase.backup.BackupInfo.BackupState)

Aggregations

BackupInfo (org.apache.hadoop.hbase.backup.BackupInfo)1 BackupState (org.apache.hadoop.hbase.backup.BackupInfo.BackupState)1