Package com.gpudb.protocol
Class CreateResourceGroupRequest
java.lang.Object
com.gpudb.protocol.CreateResourceGroupRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordpublic class CreateResourceGroupRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for
GPUdb.createResourceGroup.
Creates a new resource group to facilitate resource management.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theCreateResourceGroupRequestparameteroptions.static final classA set of string constants for theCreateResourceGroupRequestparameterranking.static final classA set of string constants for theCreateResourceGroupRequestparametertierAttributes.Constructor Summary
ConstructorsConstructorDescriptionConstructs a CreateResourceGroupRequest object with default parameters.CreateResourceGroupRequest(String name, Map<String, Map<String, String>> tierAttributes, String ranking, String adjoiningResourceGroup, Map<String, String> options) Constructs a CreateResourceGroupRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.getName()Name of the group to be created.Optional parameters.Indicates the relative ranking among existing resource groups where this new resource group will be placed.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Optional map containing tier names and their respective attribute group limits.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setAdjoiningResourceGroup(String adjoiningResourceGroup) Name of the group to be created.setOptions(Map<String, String> options) Optional parameters.setRanking(String ranking) Indicates the relative ranking among existing resource groups where this new resource group will be placed.Optional map containing tier names and their respective attribute group limits.toString()
Constructor Details
CreateResourceGroupRequest
public CreateResourceGroupRequest()Constructs a CreateResourceGroupRequest object with default parameters.CreateResourceGroupRequest
public CreateResourceGroupRequest(String name, Map<String, Map<String, String>> tierAttributes, String ranking, String adjoiningResourceGroup, Map<String, String> options) Constructs a CreateResourceGroupRequest object with the specified parameters.Parameters:name- Name of the group to be created. Must contain only letters, digits, and underscores, and cannot begin with a digit. Must not match existing resource group name.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- Indicates the relative ranking among existing resource groups where this new resource group will be placed. Supported values:FIRST: Make this resource group the new first one in the ordering.LAST: Make this resource group the new last one in the ordering.BEFORE: Place this resource group before the one specified byadjoiningResourceGroupin the ordering.AFTER: Place this resource group after the one specified byadjoiningResourceGroupin the ordering.
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’.
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.setName
Name of the group to be created. Must contain only letters, digits, and underscores, and cannot begin with a digit. Must not match existing resource group name.Parameters:name- The new value forname.Returns:thisto mimic the builder pattern.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 oftierAttributes.setTierAttributes
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
Indicates the relative ranking among existing resource groups where this new resource group will be placed. Supported values:FIRST: Make this resource group the new first one in the ordering.LAST: Make this resource group the new last one in the ordering.BEFORE: Place this resource group before the one specified byadjoiningResourceGroupin the ordering.AFTER: Place this resource group after the one specified byadjoiningResourceGroupin the ordering.
Returns:The current value ofranking.setRanking
Indicates the relative ranking among existing resource groups where this new resource group will be placed. Supported values:FIRST: Make this resource group the new first one in the ordering.LAST: Make this resource group the new last one in the ordering.BEFORE: Place this resource group before the one specified byadjoiningResourceGroupin the ordering.AFTER: Place this resource group after the one specified byadjoiningResourceGroupin the ordering.
Parameters:ranking- The new value forranking.Returns:thisto mimic the builder pattern.setAdjoiningResourceGroup
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
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’.
Map.Returns:The current value ofoptions.setOptions
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’.
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: