Package com.gpudb.protocol
Class CreateBackupRequest
java.lang.Object
com.gpudb.protocol.CreateBackupRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordA 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.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theCreateBackupRequestparameterbackupObjectsMap.static final classA set of string constants for theCreateBackupRequestparameterbackupType.static final classA set of string constants for theCreateBackupRequestparameteroptions.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.Name for this backup.Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.Type of snapshot to create.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Data sink through which the backup will be stored.Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setBackupName(String backupName) Name for this backup.setBackupObjectsMap(Map<String, String> backupObjectsMap) Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.setBackupType(String backupType) Type of snapshot to create.setDatasinkName(String datasinkName) Data sink through which the backup will be stored.setOptions(Map<String, String> options) Optional parameters.toString()
Constructor Details
CreateBackupRequest
public CreateBackupRequest()Constructs a CreateBackupRequest object with default parameters.CreateBackupRequest
public CreateBackupRequest(String backupName, String backupType, Map<String, String> backupObjectsMap, String datasinkName, Map<String, String> options) Constructs a CreateBackupRequest object with the specified parameters.Parameters:backupName- Name for this backup. If the backup already exists, only an incremental or differential backup can be made, unlessRECREATEis set toTRUE.backupType- Type of snapshot to create. Supported values:DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.FULL: Snapshot of the given database objects and data.INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
backupObjectsMap- Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.ALL: All object types and data contained in the given schema(s).CATALOG: Data Lake catalog that is external to the database.CONTEXT: Context(s).CREDENTIAL: Credential(s).DATASINK: Data sink(s).DATASOURCE: Data source(s).FUNCTION_ENVIRONMENT: Python UDF function environment(s).GRAPH: Graph(s) definition.MONITOR: Table monitor(s) / SQL stream(s).RESOURCE_GROUP: Resource group(s).ROLE: Role(s), role members (roles or users, recursively), and associated permissions.STORED_PROCEDURE: SQL procedure(s).TABLE: Table(s) and SQL view(s). Active subscriptions on any tables to be backed up will be temporarily suspended while the backup is active.USER: User(s) (internal and external) and associated permissions.USER_DEFINED_FUNCTION: UDF(s).
Map.datasinkName- Data sink through which the backup will be stored.options- Optional parameters.CHECKSUM: Whether or not to calculate checksums for backup files. Supported values:The default value isFALSE.COMMENT: Comments to store with this backup.DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:The default value isFALSE.DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when thebackupTypeis set toDIFFERENTIAL. Supported values:The default value isFALSE.DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values:The default value isFALSE.MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is ‘-1’.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 isFALSE.
Map.
Method Details
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.getBackupType
Type of snapshot to create. Supported values:DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.FULL: Snapshot of the given database objects and data.INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
Returns:The current value ofbackupType.setBackupType
Type of snapshot to create. Supported values:DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.FULL: Snapshot of the given database objects and data.INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
Parameters:backupType- The new value forbackupType.Returns:thisto mimic the builder pattern.getBackupObjectsMap
Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.ALL: All object types and data contained in the given schema(s).CATALOG: Data Lake catalog that is external to the database.CONTEXT: Context(s).CREDENTIAL: Credential(s).DATASINK: Data sink(s).DATASOURCE: Data source(s).FUNCTION_ENVIRONMENT: Python UDF function environment(s).GRAPH: Graph(s) definition.MONITOR: Table monitor(s) / SQL stream(s).RESOURCE_GROUP: Resource group(s).ROLE: Role(s), role members (roles or users, recursively), and associated permissions.STORED_PROCEDURE: SQL procedure(s).TABLE: Table(s) and SQL view(s). Active subscriptions on any tables to be backed up will be temporarily suspended while the backup is active.USER: User(s) (internal and external) and associated permissions.USER_DEFINED_FUNCTION: UDF(s).
Map.Returns:The current value ofbackupObjectsMap.setBackupObjectsMap
Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.ALL: All object types and data contained in the given schema(s).CATALOG: Data Lake catalog that is external to the database.CONTEXT: Context(s).CREDENTIAL: Credential(s).DATASINK: Data sink(s).DATASOURCE: Data source(s).FUNCTION_ENVIRONMENT: Python UDF function environment(s).GRAPH: Graph(s) definition.MONITOR: Table monitor(s) / SQL stream(s).RESOURCE_GROUP: Resource group(s).ROLE: Role(s), role members (roles or users, recursively), and associated permissions.STORED_PROCEDURE: SQL procedure(s).TABLE: Table(s) and SQL view(s). Active subscriptions on any tables to be backed up will be temporarily suspended while the backup is active.USER: User(s) (internal and external) and associated permissions.USER_DEFINED_FUNCTION: UDF(s).
Map.Parameters:backupObjectsMap- The new value forbackupObjectsMap.Returns:thisto mimic the builder pattern.setDatasinkName
Data sink through which the backup will be stored.Parameters:datasinkName- The new value fordatasinkName.Returns:thisto mimic the builder pattern.getOptions
Optional parameters.CHECKSUM: Whether or not to calculate checksums for backup files. Supported values:The default value isFALSE.COMMENT: Comments to store with this backup.DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:The default value isFALSE.DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when thebackupTypeis set toDIFFERENTIAL. Supported values:The default value isFALSE.DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values:The default value isFALSE.MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is ‘-1’.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 isFALSE.
Map.Returns:The current value ofoptions.setOptions
Optional parameters.CHECKSUM: Whether or not to calculate checksums for backup files. Supported values:The default value isFALSE.COMMENT: Comments to store with this backup.DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:The default value isFALSE.DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when thebackupTypeis set toDIFFERENTIAL. Supported values:The default value isFALSE.DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values:The default value isFALSE.MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is ‘-1’.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 isFALSE.
Map.Parameters:options- The new value foroptions.Returns:thisto 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:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: