Updating a Trino cluster
After you create a cluster, you can update its settings:
- Cluster name and description
- Service account
- Version
- Security groups
- Fault-tolerant query execution parameters
- Coordinator and worker configuration
- Additional cluster settings
Changing cluster name and description
- Navigate to the folder dashboard
and select Managed Service for Trino. - Select the cluster and click Edit in the top panel.
- Under Basic parameters, change the cluster's name and description.
- Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change cluster name and description:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
To change cluster name and description, run this command:
yc managed-trino cluster update <cluster_name_or_ID> \ --new-name <cluster_name> \ --description <cluster_description>Where:
--new-name: Cluster name, unique within the cloud.--description: Cluster description.
You can get the cluster name and ID with the list of clusters in the folder.
Alert
Do not change the cluster name using Terraform. This will delete the existing cluster and create a new one.
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
Edit the
descriptionparameter in the cluster's description:resource "yandex_trino_cluster" "<cluster_name>" { ... description = "<cluster_description>" ... }Where
descriptionis the cluster's description. -
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "<list_of_parameters_to_update>", "name": "<cluster_name>", "description": "<cluster_description>" }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
name: Cluster name, unique within the cloud. -
description: Cluster description.
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ <list_of_parameters_to_update> ] }, "name": "<cluster_name>", "description": "<cluster_description>" }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
name: Cluster name, unique within the cloud. -
description: Cluster description.
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
Check the server response to make sure your request was successful.
Changing a service account
-
Navigate to the folder dashboard
and select Managed Service for Trino. -
Select the cluster and click Edit in the top panel.
-
Under Basic parameters, select a service account or create a new one with the
managed-trino.integrationProviderandstorage.editorroles. The cluster will thus get the permissions it needs to work with user resources. For more information, see Impersonation.To change your service account in a Managed Service for Trino cluster, make sure your Yandex Cloud account has the iam.serviceAccounts.user role or higher.
Warning
If the cluster already uses a service account to access objects from Object Storage, then changing it to a different service account may make these objects unavailable and interrupt the cluster operation. Before changing the service account settings, make sure that the cluster doesn't use the objects in question.
-
Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To update a service account:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
Update your service account using this command:
yc managed-trino cluster update <cluster_name_or_ID> \ --service-account-id <service_account_ID>Where
--service-account-idis the service account ID.You can get the cluster name and ID with the list of clusters in the folder.
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
Edit the
service_account_idparameter in the cluster's description:resource "yandex_trino_cluster" "<cluster_name>" { ... service_account_id = "<service_account_ID>" ... }Where
service_account_idis the service account ID. -
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "serviceAccountId", "serviceAccountId": "<service_account_ID>" }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
serviceAccountId: Service account ID.
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "service_account_id" ] }, "service_account_id": "<service_account_ID>" }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
service_account_id: Service account ID.
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
Check the server response to make sure your request was successful.
Switching versions
- Navigate to the folder dashboard
and select Managed Service for Trino. - Select the cluster and click Edit in the top panel.
- Under Basic parameters, select Trino. You can either upgrade or downgrade the version.
- Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the Trino version:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
Change the version by running this command:
yc managed-trino cluster update <cluster_name_or_ID> \ --version <version>Where
--versionis the Trino version. You can either upgrade or downgrade the version.You can get the cluster name and ID with the list of clusters in the folder.
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
Edit the
versionparameter in the cluster's description:resource "yandex_trino_cluster" "<cluster_name>" { ... version = "<version>" ... }Where
versionis the Trino version. You can either upgrade or downgrade the version. -
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "trino.version", "trino": { "version": "<version>" } }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
version: Trino version. You can either upgrade or downgrade the version.
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "trino.version" ] }, "trino": { "version": "<version>" } }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
version: Trino version. You can either upgrade or downgrade the version.
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
Check the server response to make sure your request was successful.
Changing security groups
- Navigate to the folder dashboard
and select Managed Service for Trino. - Select the cluster and click Edit in the top panel.
- Under Network settings, select security groups for the cluster.
- Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To update security groups:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
Update security groups using this command:
yc managed-trino cluster update <cluster_name_or_ID> \ --security-group-ids <list_of_security_group_IDs>Where
--security-group-idsis the list of security group IDs.You can get the cluster name and ID with the list of clusters in the folder.
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
Edit the
security_group_idsparameter in the cluster's description:resource "yandex_trino_cluster" "<cluster_name>" { ... security_group_ids = [<list_of_security_group_IDs>] ... }Where
security_group_idsis the list of security group IDs. -
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "networkSpec.securityGroupIds", "networkSpec": { "securityGroupIds": [ <list_of_security_group_IDs> ] } }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
networkSpec: Network settings:securityGroupIds: List of security group IDs.
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "network_spec.security_group_ids" ] }, "network_spec": { "security_group_ids": [ <list_of_security_group_IDs> ] } }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
network_spec: Network settings:security_group_ids: List of security group IDs.
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
Check the server response to make sure your request was successful.
Changing fault-tolerant query execution parameters
-
Navigate to the folder dashboard
and select Managed Service for Trino. -
Select the cluster and click Edit in the top panel.
-
Under Retry policy, update the fault-tolerant query execution parameters:
-
Change the Retry object type.
-
Add or delete additional parameters in
key:valueformat in the Retry parameters field. For more information about parameters, see the Trino documentation . -
Add or delete additional Exchange Manager storage parameters in
key: valueformat in the Storage parameters field. For more information about parameters, see the Trino documentation .
-
-
Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To update fault-tolerant query execution parameters:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
Update the fault-tolerant query execution parameters using this command:
yc managed-trino cluster update <cluster_name_or_ID> \ --retry-policy-enabled \ --retry-policy <object_type_for_retry> \ --retry-policy-additional-properties <list_of_additional_parameters> \ --retry-policy-exchange-manager-service-s3 \ --retry-policy-exchange-manager-additional-properties <list_of_additional_parameters>Where:
-
--retry-policy-enabled: Enables the retry policy. -
--retry-policy: Query retry method. The allowed values are:query: Retries all stages of the query in which the worker failed.task: Retries the intermediate task within the query that caused worker failure.
-
--retry-policy-additional-properties: Additional query retry parameters in<key>=<value>format. Learn more about parameters in the Trino documentation . -
--retry-policy-exchange-manager-service-s3: Activates the use of a service Object Storage bucket as an Exchange Manager storage for intermediate data. -
--retry-policy-exchange-manager-additional-properties: Additional Exchange Manager storage parameters in<key>=<value>format. Learn more about parameters in the Trino documentation .
You can get the cluster name and ID with the list of clusters in the folder.
-
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
To enable a fault-tolerant query execution policy, add a
retry_policysection to the cluster description:resource "yandex_trino_cluster" "<cluster_name>" { ... retry_policy = { policy = "<object_type_for_retry>" additional_properties = { <list_of_additional_retry_policy_parameters> } exchange_manager = { additional_properties = { <list_of_additional_storage_parameters> } service_s3 = {} } } ... }Where:
-
policy: Query retry method. The possible values are:TASK: Retries the intermediate task within the query that caused worker failure.QUERY: Retries all stages of the query in which the worker failed.
-
additional_properties: Additional query retry parameters in"<key>" = "<value>"format. For more information about parameters, see the Trino documentation . -
exchangeManager: Exchange Manager storage parameters:service_s3: Use an S3 storage to write data when retrying queries.additional_properties: Additional Exchange Manager storage parameters in"<key>" = "<value>"format. For more information about parameters, see the Trino documentation .
-
-
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "<list_of_parameters_to_update>", "trino": { "retryPolicy": { "policy": "<object_type_for_retry>", "exchangeManager": { "storage": { "serviceS3": {} }, "additionalProperties": {<additional_storage_parameters>} }, "additionalProperties": {<additional_retry_parameters>} } } }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
trino.retryPolicy: Fault-tolerant query execution parameters.-
policy: Query retry method. The allowed values are:TASK: Retries the intermediate task within the query that caused worker failure.QUERY: Retries all stages of the query where worker failure occurred.
-
exchangeManager.additionalProperties: Additional Exchange Manager storage parameters inkey: valueformat. For more information about parameters, see the Trino documentation . -
additionalProperties: Additional parameters inkey: valueformat. For more information about parameters, see the Trino documentation .
-
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ <list_of_parameters_to_update> ] }, "trino": { "retry_policy": { "policy": "<object_type_for_retry>", "exchange_manager": { "storage": { "service_s3": "" }, "additional_properties": {<additional_storage_parameters>} }, "additional_properties": {<additional_retry_parameters>} } } }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
trino.retry_policy: Fault-tolerant query execution parameters.-
policy: Query retry method. The allowed values are:TASK: Retries the intermediate task within the query that caused worker failure.QUERY: Retries all stages of the query where worker failure occurred.
-
exchange_manager.additional_properties: Additional Exchange Manager storage parameters inkey: valueformat. For more information about parameters, see the Trino documentation . -
additional_properties: Additional parameters inkey: valueformat. For more information about parameters, see the Trino documentation .
-
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
Check the server response to make sure your request was successful.
Changing the configuration of the coordinator and workers
- Navigate to the folder dashboard
and select Managed Service for Trino. - Select the cluster and click Edit in the top panel.
- Change the configuration of the coordinator and workers.
- Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change the configuration of the coordinator and workers:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
Run this command to change the configuration of the coordinator and workers:
yc managed-trino cluster update <cluster_name_or_ID> \ --coordinator resource-preset-id=<host_class> \ --worker count=<number_of_instances>,` `min-count=<minimum_number_of_instances>,` `max-count=<maximum_number_of_instances>,` `resource-preset-id=<host_class>Where:
-
--coordinator: Coordinator configuration.resource-preset-id: Class of coordinator hosts.
-
--worker: Worker configuration:resource-preset-id: Class of worker hosts.count: Number of workers.min-count: Minimum number of workers.max-count: Maximum number of workers.
For worker count to automatically vary based on load, use
min-countandmax-count. If you need to set a fixed number of workers, usecount.
You can get the cluster name and ID with the list of clusters in the folder.
-
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
Edit the coordinator and worker configuration under
coordinatorandworker, respectively:resource "yandex_trino_cluster" "<cluster_name>" { ... coordinator = { resource_preset_id = "<class_of_computing_resources>" } worker = { fixed_scale = { count = <number_of_instances> } auto_scale = { max_count=<minimum_number_of_instances> min_count=<maximum_number_of_instances> } resource_preset_id = "<class_of_computing_resources>" } ... }Where:
-
coordinator: Coordinator configuration.resource_preset_id: Class of coordinator hosts.
-
worker: Worker configuration:-
resource_preset_id: Class of worker hosts. -
fixed_scale: Fixed number of workers.count: Number of workers
-
auto_scale: Worker number autoscaling.min_count: Minimum number of workers.max_count: Maximum number of workers.
For worker count to automatically vary based on load, use the
auto_scalesection and set the minimum and maximum values. For a fixed number of workers, use thefixed_scalesection and specify the required value. -
-
-
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "<list_of_parameters_to_update>", "trino": { "coordinatorConfig": { "resources": { "resourcePresetId": "<host_class>" } }, "workerConfig": { "resources": { "resourcePresetId": "<host_class>" }, "scalePolicy": { "fixedScale": { "count": "<number_of_instances>" }, "autoScale": { "minCount": "<minimum_number_of_instances>", "maxCount": "<maximum_number_of_instances>" } } } } }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
trino.coordinatorConfig: Coordinator configuration.resources.resourcePresetId: Class of coordinator hosts.
-
trino.workerConfig: Worker configuration:-
resources.resourcePresetId: Class of worker hosts. -
scalePolicy.fixedScale: Fixed number of workers.count: Number of workers.
-
scalePolicy.autoScale: Worker number autoscaling.minCount: Minimum number of workers.maxCount: Maximum number of workers.
For worker count to automatically vary based on load, use the
scalePolicy.autoScalesetting to set the minimum and maximum values. For a fixed number of workers, use thescalePolicy.fixedScalesetting to set the required value. -
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ <list_of_parameters_to_update> ] }, "trino": { "coordinator_config": { "resources": { "resource_preset_id": "<host_class>" } }, "worker_config": { "resources": { "resource_preset_id": "<host_class>" }, "scale_policy": { "fixed_scale": { "count": "<number_of_instances>" }, "auto_scale": { "min_count": "<minimum_number_of_instances>", "max_count": "<maximum_number_of_instances>" } } } } }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
trino.coordinator_config": Coordinator configuration.resources.resource_preset_id: Class of coordinator hosts.
-
trino.worker_config: Worker configuration:-
resources.resource_preset_id: Class of worker hosts. -
scale_policy.fixed_scale: Fixed number of workers.count: Number of workers.
-
scale_policy.auto_scale: Worker number autoscaling.minCount: Minimum number of workers.maxCount: Maximum number of workers.
For worker count to automatically vary based on load, use the
scale_policy.auto_scalesetting to set the minimum and maximum values. For a fixed number of workers, use thescale_policy.fixed_scalesetting to set the required value. -
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
Check the server response to make sure your request was successful.
Changing additional cluster settings
-
Navigate to the folder dashboard
and select Managed Service for Trino. -
Select the cluster and click Edit in the top panel.
-
Change additional cluster settings:
-
Deletion protection: Cluster protection from accidental deletion by a user.
Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
Maintenance window: Maintenance window settings.
- To enable maintenance at any time, select arbitrary (default).
- To specify the preferred maintenance start time, select by schedule and specify the desired day of the week and UTC hour. For example, you can choose a time when the cluster is least loaded.
Maintenance operations are carried out both on enabled and disabled clusters. They may include updating the DBMS, applying patches, and so on.
-
Write logs: Enables logging.
-
Select the log destination:
-
Folder: Select a folder from the list. Logs will be written to the selected folder's default log group.
-
Group: Select a log group from the list or create a new one.
-
-
Select Min. logging level from the list.
-
-
-
Click Save changes.
If you do not have the Yandex Cloud CLI installed yet, install and initialize it.
By default, the CLI uses the folder specified when creating the profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id parameter.
To change additional cluster settings:
-
View the description of the CLI command for updating a cluster:
yc managed-trino cluster update --help -
Update additional cluster settings using this command:
yc managed-trino cluster update <cluster_name_or_ID> \ --deletion-protection \ --maintenance-window type=<maintenance_type>,` `day=<day_of_week>,` `hour=<hour> \ --log-enabled \ --log-folder-id <folder_ID> \ --log-group-id <log_group_ID> \ --log-min-level <logging_level>Where:
-
--deletion-protection: Enables cluster protection against accidental deletion.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
--maintenance-window: Maintenance window settings (including for disabled clusters), wheretypeis the maintenance type:anytime: At any time (default).weekly: On a schedule. For this value, also specify the following:day: Day of week, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: Hour of day (UTC), from1to24.
-
Logging parameters:
-
--log-enabled: Enables logging. Logs generated by Trino components will be sent to Yandex Cloud Logging. -
--log-folder-id: Folder ID. Logs will be written to the default log group for this folder. -
--log-group-id: Custom log group ID.You can specify only one of the parameters:
--log-folder-idor--log-group-id. -
--log-min-level: Minimum logging level. Possible values:TRACE,DEBUG,INFO(default),WARN,ERROR, andFATAL.
-
You can get the cluster name and ID with the list of clusters in the folder.
-
-
Open the current Terraform configuration file describing your infrastructure.
For more information about creating this file, see this guide.
-
To enable cluster protection against accidental deletion, add the
deletion_protection = trueparameter:resource "yandex_trino_cluster" "<cluster_name>" { ... deletion_protection = true ... }Where
deletion_protectionis protection against accidental cluster deletion:trueorfalse.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
To change maintenance time (including for disabled clusters), add the
maintenance_windowsection to the cluster description:resource "yandex_trino_cluster" "<cluster_name>" { ... maintenance_window = { type = <maintenance_type> day = <day_of_week> hour = <hour> } ... }Where:
type: Maintenance type. The possible values include:ANYTIME: AnytimeWEEKLY: On a schedule
day: Day of week for theWEEKLYtype, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: UTC hour for theWEEKLYtype, from1to24.
-
To enable sending Trino logs to Yandex Cloud Logging, add the
loggingsection to the cluster description:resource "yandex_trino_cluster" "<cluster_name>" { ... logging = { enabled = <enable_logging> folder_id = <folder_ID> min_level = "<logging_level>" } ... }Where:
-
enabled: Enables logging,trueorfalse. -
folder_id: Folder ID. Logs will be written to the default log group for this folder. -
log_group_id: Custom log group ID. Logs will be written to this group.You can specify only one of the parameters:
folder_idorlog_group_id. -
min_level: Minimum logging level. Possible values:TRACE,DEBUG,INFO(default),WARN,ERROR, andFATAL.
-
-
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm resource changes.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Create a file named
body.jsonand paste the following code into it:{ "updateMask": "<list_of_parameters_to_update>", "deletionProtection": "<deletion_protection>", "logging": { "enabled": "<use_of_logging>", "folderId": "<folder_ID>", "logGroupId": "<log_group_ID>", "minLevel": "<logging_level>" }, "maintenanceWindow": { "weeklyMaintenanceWindow": { "day": "<day_of_week>", "hour": "<hour>" } } }Where:
-
updateMask: Comma-separated list of parameters to update.Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
updateMaskparameter. -
deletionProtection: Cluster protection from accidental deletion,trueorfalse.Even if it is enabled, one can still connect to the cluster manually and delete it.
-
logging: Logging parameters:-
enabled: Enables logging. Logs generated by Trino components will be sent to Yandex Cloud Logging. The possible values aretrueorfalse. -
folderId: Folder ID. Logs will be written to the default log group for this folder. -
logGroupId: Custom log group ID.You can specify only one of the parameters:
folderIdorlogGroupId. -
minLevel: Minimum logging level. Possible values:TRACE,DEBUG,INFO(default),WARN,ERROR, andFATAL.
-
-
maintenanceWindow: Maintenance window settings (including for disabled clusters). Provide one of the two parameters:-
anytime: Maintenance takes place at any time. -
weeklyMaintenanceWindow: Maintenance takes place once a week at the specified time:day: Day of week for theWEEKLYtype, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: Time of day (UTC) for theWEEKLYtype, from1to24.
-
-
-
Use the Cluster.Update method and send the following request, e.g., via cURL
:curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --url 'https://trino.api.cloud.yandex.net/managed-trino/v1/clusters/<cluster_ID>' --data '@body.json'You can get the cluster ID with the list of clusters in the folder.
-
Check the server response to make sure your request was successful.
-
Get an IAM token for API authentication and place it in an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume the repository contents are stored in the
~/cloudapi/directory. -
Create a file named
body.jsonand paste the following code into it:{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ <list_of_parameters_to_update> ] }, "deletion_protection": "<deletion_protection>", "logging": { "enabled": "<use_of_logging>", "folder_id": "<folder_ID>", "log_group_id": "<log_group_ID>", "min_level": "<logging_level>" }, "maintenance_window": { "weekly_maintenance_window": { "day": "<day_of_week>", "hour": "<hour>" } } }Where:
-
cluster_id: Cluster ID.You can get the cluster ID with the list of clusters in the folder.
-
update_mask: List of settings you want to modify as an array of strings (paths[]).Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }Warning
When you update a cluster, all parameters of the object you are modifying will take their defaults unless explicitly provided in the request. To avoid this, list the settings you want to change in the
update_maskparameter. -
deletion_protection: Cluster protection from accidental deletion,trueorfalse.Even with deletion protection enabled, one can still connect to the cluster manually and delete the data.
-
logging: Logging parameters:-
enabled: Enables logging. Logs generated by Trino components will be sent to Yandex Cloud Logging. The possible values aretrueorfalse. -
folder_id: Folder ID. Logs will be written to the default log group for this folder. -
log_group_id: Custom log group ID.You can specify only one of the parameters:
folderIdorlogGroupId. -
min_level: Minimum logging level. Possible values:TRACE,DEBUG,INFO(default),WARN,ERROR, andFATAL.
-
-
maintenance_window: Maintenance window settings (including for disabled clusters). Provide one of the two parameters:-
anytime: Maintenance takes place at any time. -
weekly_maintenance_window: Maintenance takes place once a week at the specified time:day: Day of week for theWEEKLYtype, i.e.,MON,TUE,WED,THU,FRI,SAT, orSUN.hour: Time of day (UTC) for theWEEKLYtype, from1to24.
-
-
-
Use the ClusterService.Update call and send the following request, e.g., via gRPCurl
:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/trino/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d @ \ trino.api.cloud.yandex.net:443 \ yandex.cloud.trino.v1.ClusterService.Update \ < body.json -
View the server response to make sure your request was successful.