Package alluxio.wire
Class BackupStatus
- java.lang.Object
-
- alluxio.wire.BackupStatus
-
public class BackupStatus extends java.lang.Object
Defines the status of a backup.
-
-
Constructor Summary
Constructors Constructor Description BackupStatus(alluxio.grpc.BackupState state)
Creates a new backup status with new Id.BackupStatus(BackupStatus status)
Cloning constructor.BackupStatus(java.util.UUID backupId, alluxio.grpc.BackupState state)
Creates a new backup status with existing Id.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BackupStatus
fromProto(alluxio.grpc.BackupPStatus pStatus)
java.util.UUID
getBackupId()
AlluxioURI
getBackupUri()
long
getEntryCount()
AlluxioException
getError()
java.lang.String
getHostname()
alluxio.grpc.BackupState
getState()
boolean
isCompleted()
boolean
isFailed()
boolean
isFinished()
void
setBackupId(java.util.UUID backupUuid)
Sets the unique backup id.BackupStatus
setBackupUri(AlluxioURI backupUri)
Sets the backup uri.BackupStatus
setEntryCount(long entryCount)
Sets entry count.BackupStatus
setError(AlluxioException error)
Fails the backup with given error.BackupStatus
setHostname(java.lang.String hostName)
Sets the backup host.BackupStatus
setState(alluxio.grpc.BackupState state)
Sets the backup state.alluxio.grpc.BackupPStatus
toProto()
java.lang.String
toString()
-
-
-
Constructor Detail
-
BackupStatus
public BackupStatus(alluxio.grpc.BackupState state)
Creates a new backup status with new Id.- Parameters:
state
- state of the backup
-
BackupStatus
public BackupStatus(java.util.UUID backupId, alluxio.grpc.BackupState state)
Creates a new backup status with existing Id.- Parameters:
backupId
- the backup idstate
- state of the backup
-
BackupStatus
public BackupStatus(BackupStatus status)
Cloning constructor.- Parameters:
status
- backup status to clone
-
-
Method Detail
-
fromProto
public static BackupStatus fromProto(alluxio.grpc.BackupPStatus pStatus)
- Parameters:
pStatus
- proto backup status- Returns:
- backup status from proto representation
-
getBackupId
public java.util.UUID getBackupId()
- Returns:
- the unique backup id
-
setBackupId
public void setBackupId(java.util.UUID backupUuid)
Sets the unique backup id.- Parameters:
backupUuid
- backup id
-
getEntryCount
public long getEntryCount()
- Returns:
- current entry count in the backup
-
setEntryCount
public BackupStatus setEntryCount(long entryCount)
Sets entry count.- Parameters:
entryCount
- the entry count- Returns:
- the updated instance
-
isFinished
public boolean isFinished()
- Returns:
true
if the backup is finished (completed | failed)
-
isCompleted
public boolean isCompleted()
- Returns:
true
if the backup is completed successfully
-
isFailed
public boolean isFailed()
- Returns:
true
if the backup is failed
-
getState
public alluxio.grpc.BackupState getState()
- Returns:
- the backup state
-
setState
public BackupStatus setState(alluxio.grpc.BackupState state)
Sets the backup state.- Parameters:
state
- the backup state- Returns:
- the updated instance
-
getError
public AlluxioException getError()
- Returns:
- the error if backup was failed
-
setError
public BackupStatus setError(AlluxioException error)
Fails the backup with given error. Adjusts the backup state toBackupState.Failed
.- Parameters:
error
- the backup error- Returns:
- the updated instance
-
getHostname
public java.lang.String getHostname()
- Returns:
- the backup host
-
setHostname
public BackupStatus setHostname(java.lang.String hostName)
Sets the backup host.- Parameters:
hostName
- the backup host- Returns:
- the updated instance
-
getBackupUri
public AlluxioURI getBackupUri()
- Returns:
- the backup URI
-
setBackupUri
public BackupStatus setBackupUri(AlluxioURI backupUri)
Sets the backup uri.- Parameters:
backupUri
- the backup uri- Returns:
- the updated instance
-
toProto
public alluxio.grpc.BackupPStatus toProto()
- Returns:
- the proto representation
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-