Updated on 2025-08-06 GMT+08:00

Adding Queue Properties

Function

This API is used to add queue properties. You can add multiple properties at a time.

Currently, the following queue properties can be set:

Spark driver parameters: Set them to improve the scheduling efficiency of queues.

Notes and Constraints

  • Only SQL queues of the Spark engine support configuring queue properties.
  • Queue properties can only be set after a queue is created.
  • Currently, only queue properties related to the Spark driver can be set.
  • You cannot set queue properties in batches.

URI

  • URI format

    POST /v3/{project_id}/queues/{queue_name}/properties

  • Parameter descriptions
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For how to obtain a project ID, see Obtaining a Project ID.

    queue_name

    Yes

    String

    Queue name.

Request Parameters

Table 2 Request body parameter

Parameter

Mandatory

Type

Description

properties

No

object

Queue properties to be updated. For details, see Table 3.

Table 3 properties parameter descriptions

Parameter

Mandatory

Type

Description

computeEngine.maxInstance

No

integer

Maximum number of Spark drivers can be started on this queue.

job.maxConcurrent

No

integer

Maximum number of jobs can be concurrently executed by a Spark driver.

computeEngine.maxPrefetchInstance

No

integer

Maximum number of Spark drivers can be prestarted on this queue.

computeEngine.spark.nativeEnabled

No

String

Whether to enable Spark Native.

Currently, Spark Native attributes can be set only in the following regions:
  • AP-Bangkok
  • AP-Singapore

Response Parameters

Table 4 Response parameters

Parameter

Mandatory

Type

Description

is_success

No

Boolean

Whether the request is successfully executed. true indicates that the request is successfully executed.

message

No

String

System prompt. If the execution succeeds, this parameter may be left blank.

Example Request

Set queue properties.

{
  "properties" : {
    "computeEngine.maxInstance" : 2,
    "job.maxConcurrent" : 32,
    "computeEngine.maxPrefetchInstance" : 1
  }
}

Example Response

None

Status Codes

Table 5 describes the status codes.

Table 5 Status codes

Status Code

Description

200

The property addition API is successfully called.

400

Request failed.

500

Internal server error.

Error Codes

If an error occurs when this API is called, an error code and message are returned. For details, see Error Codes.