Compute Cluster Management

Description

This feature allows users to perform operations such as starting, stopping, canceling jobs, modifying attribute configurations, and updating cluster descriptions for specified compute clusters. Through these operations, users can flexibly manage computing resources to meet different business needs.

Syntax

-- Start the compute cluster
ALTER VCLUSTER [ IF EXISTS ] name RESUME ;

-- Stop the compute cluster
ALTER VCLUSTER [ IF EXISTS ] name SUSPEND [FORCE];

-- Cancel all jobs in the compute cluster
ALTER VCLUSTER [ IF EXISTS ] name CANCEL ALL JOBS;

-- Modify compute cluster properties
ALTER VCLUSTER [ IF EXISTS ] name SET [ objectProperties ];
    --Parameter description
        --Modify properties applicable to Analytics Purpose Virtual Cluster           
        objectProperties ::=
                    VCLUSTER_SIZE = num --Integer from 1 to 256 
                    MIN_REPLICAS = num
                    MAX_REPLICAS = num
                    AUTO_SUSPEND_IN_SECOND = num
                    AUTO_RESUME = TRUE| FALSE
                    MAX_CONCURRENCY = num
                    QUERY_RUNTIME_LIMIT_IN_SECOND = num
                    PRELOAD_TABLES = "<schema_name>.<table_name>[,<schema_name>.<table_name>,...]"
                    AUTO_PRELOAD_IN_SECOND = num
            
        --Modify properties applicable to General Purpose Virtual Cluster             
        objectProperties ::=
                    [VCLUSTER_SIZE = num | MIN_VCLUSTER_SIZE=num  MAX_VCLUSTER_SIZE=num] --Integer from 1 to 256 
                    VCLUSTER_TYPE = GENERAL 
                    AUTO_SUSPEND_IN_SECOND = num
                    AUTO_RESUME = TRUE| FALSE
                    QUERY_RUNTIME_LIMIT_IN_SECOND = num
                    QUERY_RESOURCE_LIMIT_RATIO=num;


        --Modify properties applicable to Integration Virtual Cluster             
        objectProperties ::=
                    [VCLUSTER_SIZE = num | MIN_VCLUSTER_SIZE=num  MAX_VCLUSTER_SIZE=num] --0.25, 0.5 and integers from 1 to 256 
                    VCLUSTER_TYPE = INTEGRATION 
                    AUTO_SUSPEND_IN_SECOND = num
                    AUTO_RESUME = TRUE| FALSE
                    QUERY_RUNTIME_LIMIT_IN_SECOND = num;


-- Modify the description information of the compute cluster
ALTER VCLUSTER [ IF EXISTS ] name SET COMMENT '';

Parameter Details

  1. name

Specify the name of the compute cluster.

  1. objectProperties

Configuration properties of the compute cluster, with specific fields and descriptions as follows:

Field NameField MeaningValue RangeDefault Value
VCLUSTER_SIZECompute cluster size. Supports sizes from 1 CRU to 256 CRU, with increasing computational power. (Synchronous clusters separately support two small sizes: 0.25 CRU and 0.5 CRU)Number: 1-256, unit is CRU (Compute Resource Unit).1
MIN_VCLUSTER_SIZEApplicable only to GENERAL clusters. Minimum size of the compute cluster during scaling, supports sizes from 1 CRU to 256 CRU, must be less than or equal to the MAX_VCLUSTER_SIZE parameter. Cannot be used simultaneously with VCLUSTER_SIZE.Number: 1-256, unit is CRU (Compute Resource Unit).None
MAX_VCLUSTER_SIZEApplicable only to GENERAL clusters. Maximum size of the compute cluster during scaling, supports sizes from 1 CRU to 256 CRU, must be greater than or equal to the MIN_VCLUSTER_SIZE parameter. Cannot be used simultaneously with VCLUSTER_SIZE.Number: 1-256, unit is CRU (Compute Resource Unit).None
VCLUSTER_TYPEType of compute cluster. GENERAL: Suitable for data ingestion and ELT operations; ANALYTICS: Suitable for scenarios with strong requirements for query latency and concurrency; INTEGRATION: Used for data integration tasks.GENERAL | ANALYTICS |INTEGRATIONGENERAL
MIN_REPLICASMinimum number of instances for the compute cluster. Only applicable to analytical compute clusters.1-101
MAX_REPLICASMaximum number of instances for the compute cluster. Only applicable to analytical compute clusters.1-101
AUTO_SUSPEND_IN_SECONDThe idle time before the cluster automatically shuts down. Unit: seconds.Values: -1 or other integers greater than or equal to 0.600
AUTO_RESUMEWhether to automatically resume.TRUE|FALSETRUE
MAX_CONCURRENCYThe maximum concurrency that each compute instance in the compute cluster can handle. Only applicable to analytical compute clusters.1-328
QUERY_RUNTIME_LIMIT_IN_SECONDThe maximum execution time for jobs submitted to this compute cluster. Unit: seconds.Integers greater than 0.86400
PRELOAD_TABLESThe compute cluster can cache the data of the tables specified in preload_table to the local SSD disk of the compute cluster by configuring preload_table, either on a schedule or when triggered. You can also set cache policies on the table. Only applicable to analytical compute clusters.schema_name.table_name, multiple table names separated by commas. Wildcards are supported, for example: sample_schema.*null
QUERY_RESOURCE_LIMIT_RATIOSingle Job Resource Ratio Threshold, the maximum proportion of CPU/memory resources that a single query task can use, relative to the total cluster resources0.0 ~ 1.0 (e.g., 0.1 means 10%)1.0
  1. Specify the maximum and minimum values for GP type VC when modifying
ALTER VCLUSTER [IF  EXISTS] <name> 
SET MIN_VCLUSTER_SIZE=num 
MAX_VCLUSTER_SIZE=num;

Usage Example

  1. Start the compute cluster named sample_vc:
    ALTER VCLUSTER sample_vc RESUME;
  2. Stop the compute cluster named sample_vc:
    ALTER VCLUSTER sample_vc SUSPEND;
3. Force stop the compute cluster named sample\_vc:
ALTER VCLUSTER sample_vc SUSPEND FORCE;
4. Cancel all jobs in the compute cluster named sample\_vc:
ALTER VCLUSTER sample_vc CANCEL ALL JOBS;
  1. Modify the specification size of the compute cluster named sample_vc to XSMALL:
    ALTER VCLUSTER sample_vc SET VCLUSTER_SIZE='1';
  2. Modify the concurrency number of the computing cluster named sample_vc to 4:
    ALTER VCLUSTER sample_vc SET MAX_CONCURRENCY = 4;
  3. Modify the description information of the compute cluster named sample_vc:
ALTER VCLUSTER sample_vc SET COMMENT 'This is a sample computing cluster';