public class BackupLeaderRole extends AbstractBackupRole
BackupRole
for primary mode.mBackupManager, mBackupTracker, mCatalystRequestTimeout, mExecutorService, mGrpcMessagingContext, mJournalSystem, mRoleClosed, mServerUserState, mTaskScheduler, mUfsManager
Constructor and Description |
---|
BackupLeaderRole(CoreMasterContext masterContext)
Creates a new backup leader.
|
Modifier and Type | Method and Description |
---|---|
BackupStatus |
backup(BackupPRequest request,
StateLockOptions stateLockOptions)
Takes a backup.
|
void |
close() |
BackupStatus |
getBackupStatus(BackupStatusPRequest statusPRequest)
Used to query the status of a backup.
|
Map<ServiceType,GrpcService> |
getRoleServices() |
sendMessageBlocking, takeBackup
public BackupLeaderRole(CoreMasterContext masterContext)
masterContext
- the master contextpublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractBackupRole
IOException
public Map<ServiceType,GrpcService> getRoleServices()
public BackupStatus backup(BackupPRequest request, StateLockOptions stateLockOptions) throws AlluxioException
BackupOps
BackupOps.getBackupStatus(alluxio.grpc.BackupStatusPRequest)
should be called
for querying the status of the on-going backup.
Note: When leader has no standby in an HA cluster, it will reject backup. This could be
allowed by passing "AllowLeader" option in the request.request
- the backup requeststateLockOptions
- the state lock options during the backupAlluxioException
- if backup failspublic BackupStatus getBackupStatus(BackupStatusPRequest statusPRequest) throws AlluxioException
BackupOps
statusPRequest
- status requestAlluxioException
- if request failsCopyright © 2023. All Rights Reserved.