Class CreateBackupRequest

  • All Implemented Interfaces:
    org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

    public class CreateBackupRequest
    extends Object
    implements org.apache.avro.generic.IndexedRecord
    A set of parameters for GPUdb.createBackup.

    Creates a database backup, containing a snapshot of existing objects, at the remote file store accessible via the data sink specified by datasinkName.

    • Constructor Detail

      • CreateBackupRequest

        public CreateBackupRequest()
        Constructs a CreateBackupRequest object with default parameters.
    • Method Detail

      • getClassSchema

        public static org.apache.avro.Schema getClassSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Returns:
        The schema for the class.
      • getBackupName

        public String getBackupName()
        Name for this backup. If the backup already exists, only an incremental or differential backup can be made, unless RECREATE is set to TRUE.
        Returns:
        The current value of backupName.
      • setBackupName

        public CreateBackupRequest setBackupName​(String backupName)
        Name for this backup. If the backup already exists, only an incremental or differential backup can be made, unless RECREATE is set to TRUE.
        Parameters:
        backupName - The new value for backupName.
        Returns:
        this to mimic the builder pattern.
      • getBackupType

        public String getBackupType()
        Type of snapshot to create. Supported values:
        • INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
        • DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.
        • FULL: Snapshot of the given database objects and data.
        Returns:
        The current value of backupType.
      • setBackupType

        public CreateBackupRequest setBackupType​(String backupType)
        Type of snapshot to create. Supported values:
        • INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
        • DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.
        • FULL: Snapshot of the given database objects and data.
        Parameters:
        backupType - The new value for backupType.
        Returns:
        this to mimic the builder pattern.
      • getDatasinkName

        public String getDatasinkName()
        Data sink through which the backup will be stored.
        Returns:
        The current value of datasinkName.
      • setDatasinkName

        public CreateBackupRequest setDatasinkName​(String datasinkName)
        Data sink through which the backup will be stored.
        Parameters:
        datasinkName - The new value for datasinkName.
        Returns:
        this to mimic the builder pattern.
      • getOptions

        public Map<String,​String> getOptions()
        Optional parameters.
        • COMMENT: Comments to store with this backup.
        • CHECKSUM: Whether or not to calculate checksums for backup files. Supported values: The default value is FALSE.
        • DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:
          • TRUE: For tables, only back up DDL, not data.
          • FALSE: For tables, back up DDL and data.
          The default value is FALSE.
        • MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is '-1'.
        • DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when the backupType is set to DIFFERENTIAL. Supported values: The default value is FALSE.
        • RECREATE: Whether or not to replace an existing backup object with a new backup with a full snapshot, if one already exists. Supported values: The default value is FALSE.
        • DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values: The default value is FALSE.
        The default value is an empty Map.
        Returns:
        The current value of options.
      • setOptions

        public CreateBackupRequest setOptions​(Map<String,​String> options)
        Optional parameters.
        • COMMENT: Comments to store with this backup.
        • CHECKSUM: Whether or not to calculate checksums for backup files. Supported values: The default value is FALSE.
        • DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:
          • TRUE: For tables, only back up DDL, not data.
          • FALSE: For tables, back up DDL and data.
          The default value is FALSE.
        • MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is '-1'.
        • DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when the backupType is set to DIFFERENTIAL. Supported values: The default value is FALSE.
        • RECREATE: Whether or not to replace an existing backup object with a new backup with a full snapshot, if one already exists. Supported values: The default value is FALSE.
        • DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values: The default value is FALSE.
        The default value is an empty Map.
        Parameters:
        options - The new value for options.
        Returns:
        this to mimic the builder pattern.
      • getSchema

        public org.apache.avro.Schema getSchema()
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        getSchema in interface org.apache.avro.generic.GenericContainer
        Returns:
        The schema object describing this class.
      • get

        public Object get​(int index)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        get in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to get
        Returns:
        value of the field with the given index.
        Throws:
        IndexOutOfBoundsException
      • put

        public void put​(int index,
                        Object value)
        This method supports the Avro framework and is not intended to be called directly by the user.
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Parameters:
        index - the position of the field to set
        value - the value to set
        Throws:
        IndexOutOfBoundsException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object