public class BackupLeaderRole extends AbstractBackupRole
BackupRole
for primary mode.mBackupManager, mBackupTracker, mCatalystContext, mCatalystRequestTimeout, mExecutorService, 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 secondary 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
public BackupStatus getBackupStatus(BackupStatusPRequest statusPRequest) throws AlluxioException
BackupOps
statusPRequest
- status requestAlluxioException
Copyright © 2023. All Rights Reserved.