public class BackupManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BACKUP_FILE_FORMAT
The name format of the backup files (E.g., alluxio-backup-2018-12-14-1544749081561.gz).
|
static Pattern |
BACKUP_FILE_PATTERN |
Constructor and Description |
---|
BackupManager(MasterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
void |
backup(OutputStream os,
AtomicLong entryCount)
Writes a backup to the specified stream.
|
void |
initFromBackup(InputStream is)
Restores master state from the specified backup.
|
public static final String BACKUP_FILE_FORMAT
public static final Pattern BACKUP_FILE_PATTERN
public BackupManager(MasterRegistry registry)
registry
- a master registry containing the masters to backup or restorepublic void backup(OutputStream os, AtomicLong entryCount) throws IOException
os
- the stream to write toentryCount
- will receive total entry count that are backed upIOException
public void initFromBackup(InputStream is) throws IOException
is
- an input stream to read from the backupIOException
Copyright © 2023. All Rights Reserved.