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.IndexedRecord
public class CreateBackupRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.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 Classes Modifier and Type Class Description static classCreateBackupRequest.BackupObjectsMapA set of string constants for theCreateBackupRequestparameterbackupObjectsMap.static classCreateBackupRequest.BackupTypeA set of string constants for theCreateBackupRequestparameterbackupType.static classCreateBackupRequest.OptionsA set of string constants for theCreateBackupRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description CreateBackupRequest()Constructs a CreateBackupRequest object with default parameters.CreateBackupRequest(String backupName, String backupType, Map<String,String> backupObjectsMap, String datasinkName, Map<String,String> options)Constructs a CreateBackupRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.StringgetBackupName()Name for this backup.Map<String,String>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.StringgetBackupType()Type of snapshot to create.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetDatasinkName()Data sink through which the backup will be stored.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.CreateBackupRequestsetBackupName(String backupName)Name for this backup.CreateBackupRequestsetBackupObjectsMap(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.CreateBackupRequestsetBackupType(String backupType)Type of snapshot to create.CreateBackupRequestsetDatasinkName(String datasinkName)Data sink through which the backup will be stored.CreateBackupRequestsetOptions(Map<String,String> options)Optional parameters.StringtoString()
-
-
-
Constructor Detail
-
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: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.
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 schemas(s).TABLE: Tables(s) and SQL view(s).CATALOG: CatalogCREDENTIAL: Credential(s).CONTEXT: Context(s).DATASINK: Data sink(s).DATASOURCE: Data source(s).STORED_PROCEDURE: SQL procedure(s).MONITOR: Table monitor(s) / SQL stream(s).USER: User(s) (internal and external) and associated permissions.ROLE: Role(s), role members (roles or users, recursively), and associated permissions.CONFIGURATION: IfTRUE, backup the database configuration file. Supported values: The default value isFALSE.
datasinkName- Data sink through which the backup will be stored.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 isFALSE.DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values: The default value isFALSE.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 thebackupTypeis set toDIFFERENTIAL. Supported values: The default value isFALSE.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.DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values: The default value isFALSE.
Map.
-
-
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, unlessRECREATEis set toTRUE.- 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, unlessRECREATEis set toTRUE.- Parameters:
backupName- The new value forbackupName.- Returns:
thisto 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 forbackupType.- Returns:
thisto mimic the builder pattern.
-
getBackupObjectsMap
public Map<String,String> 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 schemas(s).TABLE: Tables(s) and SQL view(s).CATALOG: CatalogCREDENTIAL: Credential(s).CONTEXT: Context(s).DATASINK: Data sink(s).DATASOURCE: Data source(s).STORED_PROCEDURE: SQL procedure(s).MONITOR: Table monitor(s) / SQL stream(s).USER: User(s) (internal and external) and associated permissions.ROLE: Role(s), role members (roles or users, recursively), and associated permissions.CONFIGURATION: IfTRUE, backup the database configuration file. Supported values: The default value isFALSE.
- Returns:
- The current value of
backupObjectsMap.
-
setBackupObjectsMap
public CreateBackupRequest 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.ALL: All object types and data contained in the given schemas(s).TABLE: Tables(s) and SQL view(s).CATALOG: CatalogCREDENTIAL: Credential(s).CONTEXT: Context(s).DATASINK: Data sink(s).DATASOURCE: Data source(s).STORED_PROCEDURE: SQL procedure(s).MONITOR: Table monitor(s) / SQL stream(s).USER: User(s) (internal and external) and associated permissions.ROLE: Role(s), role members (roles or users, recursively), and associated permissions.CONFIGURATION: IfTRUE, backup the database configuration file. Supported values: The default value isFALSE.
- Parameters:
backupObjectsMap- The new value forbackupObjectsMap.- Returns:
thisto 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 fordatasinkName.- Returns:
thisto 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 isFALSE.DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values: The default value isFALSE.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 thebackupTypeis set toDIFFERENTIAL. Supported values: The default value isFALSE.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.DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values: The default value isFALSE.
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 isFALSE.DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values: The default value isFALSE.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 thebackupTypeis set toDIFFERENTIAL. Supported values: The default value isFALSE.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.DRY_RUN: Whether or not to perform a dry run of a backup operation. 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.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:
getin interfaceorg.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:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-