Package com.gpudb.protocol
Class AlterResourceGroupRequest
- java.lang.Object
-
- com.gpudb.protocol.AlterResourceGroupRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class AlterResourceGroupRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.alterResourceGroup.Alters the properties of an existing resource group to facilitate resource management.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAlterResourceGroupRequest.OptionsA set of string constants for theAlterResourceGroupRequestparameteroptions.static classAlterResourceGroupRequest.RankingA set of string constants for theAlterResourceGroupRequestparameterranking.static classAlterResourceGroupRequest.TierAttributesA set of string constants for theAlterResourceGroupRequestparametertierAttributes.
-
Constructor Summary
Constructors Constructor Description AlterResourceGroupRequest()Constructs an AlterResourceGroupRequest object with default parameters.AlterResourceGroupRequest(String name, Map<String,Map<String,String>> tierAttributes, String ranking, String adjoiningResourceGroup, Map<String,String> options)Constructs an AlterResourceGroupRequest 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.StringgetAdjoiningResourceGroup()static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetName()Name of the group to be altered.Map<String,String>getOptions()Optional parameters.StringgetRanking()If the resource group ranking is to be updated, this indicates the relative ranking among existing resource groups where this resource group will be placed.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.Map<String,Map<String,String>>getTierAttributes()Optional map containing tier names and their respective attribute group limits.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AlterResourceGroupRequestsetAdjoiningResourceGroup(String adjoiningResourceGroup)AlterResourceGroupRequestsetName(String name)Name of the group to be altered.AlterResourceGroupRequestsetOptions(Map<String,String> options)Optional parameters.AlterResourceGroupRequestsetRanking(String ranking)If the resource group ranking is to be updated, this indicates the relative ranking among existing resource groups where this resource group will be placed.AlterResourceGroupRequestsetTierAttributes(Map<String,Map<String,String>> tierAttributes)Optional map containing tier names and their respective attribute group limits.StringtoString()
-
-
-
Constructor Detail
-
AlterResourceGroupRequest
public AlterResourceGroupRequest()
Constructs an AlterResourceGroupRequest object with default parameters.
-
AlterResourceGroupRequest
public AlterResourceGroupRequest(String name, Map<String,Map<String,String>> tierAttributes, String ranking, String adjoiningResourceGroup, Map<String,String> options)
Constructs an AlterResourceGroupRequest object with the specified parameters.- Parameters:
name- Name of the group to be altered. Must be an existing resource group name or an empty string when used in conjunction withIS_DEFAULT_GROUP.tierAttributes- Optional map containing tier names and their respective attribute group limits. The only valid attribute limit that can be set is max_memory (in bytes) for the VRAM and RAM tiers. For instance, to set max VRAM capacity to 1GB per rank per GPU and max RAM capacity to 10GB per rank, use: {'VRAM':{'max_memory':'1000000000'}, 'RAM':{'max_memory':'10000000000'}}.MAX_MEMORY: Maximum amount of memory usable at one time, per rank, per GPU, for the VRAM tier; or maximum amount of memory usable at one time, per rank, for the RAM tier.
Map.ranking- If the resource group ranking is to be updated, this indicates the relative ranking among existing resource groups where this resource group will be placed. Supported values:EMPTY_STRING: Don't change the rankingFIRST: Make this resource group the new first one in the orderingLAST: Make this resource group the new last one in the orderingBEFORE: Place this resource group before the one specified byadjoiningResourceGroupin the orderingAFTER: Place this resource group after the one specified byadjoiningResourceGroupin the ordering
EMPTY_STRING.adjoiningResourceGroup- IfrankingisBEFOREorAFTER, this field indicates the resource group before or after which the current group will be placed; otherwise, leave blank. The default value is ''.options- Optional parameters.MAX_CPU_CONCURRENCY: Maximum number of simultaneous threads that will be used to execute a request, per rank, for this group. The minimum allowed value is '4'.MAX_DATA: Maximum amount of data, per rank, in bytes, that can be used by all database objects within this group. Set to -1 to indicate no upper limit. The minimum allowed value is '-1'.MAX_SCHEDULING_PRIORITY: Maximum priority of a scheduled task for this group. The minimum allowed value is '1'. The maximum allowed value is '100'.MAX_TIER_PRIORITY: Maximum priority of a tiered object for this group. The minimum allowed value is '1'. The maximum allowed value is '10'.IS_DEFAULT_GROUP: IfTRUE, this request applies to the global default resource group. It is an error for this field to beTRUEwhen thenamefield is also populated. Supported values: The default value isFALSE.PERSIST: IfTRUEand a system-level change was requested, the system configuration will be written to disk upon successful application of this request. This will commit the changes from this request and any additional in-memory modifications. Supported values: The default value isTRUE.
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.
-
getName
public String getName()
Name of the group to be altered. Must be an existing resource group name or an empty string when used in conjunction withIS_DEFAULT_GROUP.- Returns:
- The current value of
name.
-
setName
public AlterResourceGroupRequest setName(String name)
Name of the group to be altered. Must be an existing resource group name or an empty string when used in conjunction withIS_DEFAULT_GROUP.- Parameters:
name- The new value forname.- Returns:
thisto mimic the builder pattern.
-
getTierAttributes
public Map<String,Map<String,String>> getTierAttributes()
Optional map containing tier names and their respective attribute group limits. The only valid attribute limit that can be set is max_memory (in bytes) for the VRAM and RAM tiers.For instance, to set max VRAM capacity to 1GB per rank per GPU and max RAM capacity to 10GB per rank, use: {'VRAM':{'max_memory':'1000000000'}, 'RAM':{'max_memory':'10000000000'}}.
MAX_MEMORY: Maximum amount of memory usable at one time, per rank, per GPU, for the VRAM tier; or maximum amount of memory usable at one time, per rank, for the RAM tier.
Map.- Returns:
- The current value of
tierAttributes.
-
setTierAttributes
public AlterResourceGroupRequest setTierAttributes(Map<String,Map<String,String>> tierAttributes)
Optional map containing tier names and their respective attribute group limits. The only valid attribute limit that can be set is max_memory (in bytes) for the VRAM and RAM tiers.For instance, to set max VRAM capacity to 1GB per rank per GPU and max RAM capacity to 10GB per rank, use: {'VRAM':{'max_memory':'1000000000'}, 'RAM':{'max_memory':'10000000000'}}.
MAX_MEMORY: Maximum amount of memory usable at one time, per rank, per GPU, for the VRAM tier; or maximum amount of memory usable at one time, per rank, for the RAM tier.
Map.- Parameters:
tierAttributes- The new value fortierAttributes.- Returns:
thisto mimic the builder pattern.
-
getRanking
public String getRanking()
If the resource group ranking is to be updated, this indicates the relative ranking among existing resource groups where this resource group will be placed. Supported values:EMPTY_STRING: Don't change the rankingFIRST: Make this resource group the new first one in the orderingLAST: Make this resource group the new last one in the orderingBEFORE: Place this resource group before the one specified byadjoiningResourceGroupin the orderingAFTER: Place this resource group after the one specified byadjoiningResourceGroupin the ordering
EMPTY_STRING.- Returns:
- The current value of
ranking.
-
setRanking
public AlterResourceGroupRequest setRanking(String ranking)
If the resource group ranking is to be updated, this indicates the relative ranking among existing resource groups where this resource group will be placed. Supported values:EMPTY_STRING: Don't change the rankingFIRST: Make this resource group the new first one in the orderingLAST: Make this resource group the new last one in the orderingBEFORE: Place this resource group before the one specified byadjoiningResourceGroupin the orderingAFTER: Place this resource group after the one specified byadjoiningResourceGroupin the ordering
EMPTY_STRING.- Parameters:
ranking- The new value forranking.- Returns:
thisto mimic the builder pattern.
-
getAdjoiningResourceGroup
public String getAdjoiningResourceGroup()
IfrankingisBEFOREorAFTER, this field indicates the resource group before or after which the current group will be placed; otherwise, leave blank. The default value is ''.- Returns:
- The current value of
adjoiningResourceGroup.
-
setAdjoiningResourceGroup
public AlterResourceGroupRequest setAdjoiningResourceGroup(String adjoiningResourceGroup)
IfrankingisBEFOREorAFTER, this field indicates the resource group before or after which the current group will be placed; otherwise, leave blank. The default value is ''.- Parameters:
adjoiningResourceGroup- The new value foradjoiningResourceGroup.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.MAX_CPU_CONCURRENCY: Maximum number of simultaneous threads that will be used to execute a request, per rank, for this group. The minimum allowed value is '4'.MAX_DATA: Maximum amount of data, per rank, in bytes, that can be used by all database objects within this group. Set to -1 to indicate no upper limit. The minimum allowed value is '-1'.MAX_SCHEDULING_PRIORITY: Maximum priority of a scheduled task for this group. The minimum allowed value is '1'. The maximum allowed value is '100'.MAX_TIER_PRIORITY: Maximum priority of a tiered object for this group. The minimum allowed value is '1'. The maximum allowed value is '10'.IS_DEFAULT_GROUP: IfTRUE, this request applies to the global default resource group. It is an error for this field to beTRUEwhen thenamefield is also populated. Supported values: The default value isFALSE.PERSIST: IfTRUEand a system-level change was requested, the system configuration will be written to disk upon successful application of this request. This will commit the changes from this request and any additional in-memory modifications. Supported values: The default value isTRUE.
Map.- Returns:
- The current value of
options.
-
setOptions
public AlterResourceGroupRequest setOptions(Map<String,String> options)
Optional parameters.MAX_CPU_CONCURRENCY: Maximum number of simultaneous threads that will be used to execute a request, per rank, for this group. The minimum allowed value is '4'.MAX_DATA: Maximum amount of data, per rank, in bytes, that can be used by all database objects within this group. Set to -1 to indicate no upper limit. The minimum allowed value is '-1'.MAX_SCHEDULING_PRIORITY: Maximum priority of a scheduled task for this group. The minimum allowed value is '1'. The maximum allowed value is '100'.MAX_TIER_PRIORITY: Maximum priority of a tiered object for this group. The minimum allowed value is '1'. The maximum allowed value is '10'.IS_DEFAULT_GROUP: IfTRUE, this request applies to the global default resource group. It is an error for this field to beTRUEwhen thenamefield is also populated. Supported values: The default value isFALSE.PERSIST: IfTRUEand a system-level change was requested, the system configuration will be written to disk upon successful application of this request. This will commit the changes from this request and any additional in-memory modifications. Supported values: The default value isTRUE.
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
-
-