Package alluxio.wire

Class BackupStatus


  • public class BackupStatus
    extends java.lang.Object
    Defines the status of a backup.
    • 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 id
        state - 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 to BackupState.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 class java.lang.Object