tencent cloud

Tencent Cloud TCHouse-D

Product Introduction
Overview
Concepts
Cluster Architecture
Strengths
Scenarios
Purchase Guide
Billing Overview
Renewal Instructions
Overdue Policy
Refund Instructions
Configuration Adjustment Billing Instructions
Getting Started
Using Tencent Cloud TCHouse-D Through the Console
Using Tencent Cloud TCHouse-D Through a Client
Operation Guide
Cluster Operation
Monitoring and Alarm Configuration
Account Privilege Management
Data Management
Query Management
Modify Configurations
Node Management
Log Analysis
SQL Studio
Enabling Resource Isolation
Development Guide
Design of Data Table
Importing Data
Exporting Data
Basic Feature
Query Optimization
Ecological Expansion Feature
API Documentation
History
Introduction
API Category
Making API Requests
Cluster Operation APIs
Database and Table APIs
Cluster Information Viewing APIs
Hot-Cold Data Layering APIs
Database and Operation Audit APIs
User and Permission APIs
Resource Group Management APIs
Data Types
Error Codes
Cloud Ecosystem
Granting CAM Policies to Sub-accounts
Query Acceleration for Tencent Cloud DLC
Practical Tutorial
Basic Feature Usage
Advanced Features Usage
Resource Specification Selection and Optimization Suggestions
Naming Specifications and Limits to the Database and Data Table
Table Design and Data Import
Query Optimization
Suggested Usage to Avoid
Accessing TCHouse-D via JDBC over the Public Network
Performance Testing
TPC-H Performance Testing
SSB Performance Testing
TPC-DS Performance Testing
FAQs
Common Operational Issues
Common Errors
Contact Us
Glossary
Product Policy
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement

Modify Configurations Through Client

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-06-27 10:52:46
In addition to the Console, you can also configure parameters through the client. This document will introduce related configuration methods.

FE Parameter Configuration

The configuration file of FE, fe.conf, is usually placed in the conf/ directory of the FE deployment path.
Another configuration file, fe_custom.conf, is used to record configuration items that users dynamically configure and persist at runtime.
After the FE process starts, it will first read the configuration items in fe.conf, and then read the configuration items in fe_custom.conf. The configuration items in fe_custom.conf will overwrite the same configuration items in fe.conf.
The location of the fe_custom.conf file can be configured through the custom_config_dir configuration item in fe.conf.

Viewing Configuration Items

After FE starts, you can view the configuration items of FE in the MySQL client using the following command: ADMIN SHOW FRONTEND CONFIG; The meanings of each column in the results are as follows:
Key: name of the configuration item.
Value: current value of the configuration item.
Type: value type of the configuration item, whether it's integer or character string.
IsMutable: Whether it can be dynamically configured. If true, it means that this configuration item can be dynamically configured at runtime. If false, it means that this configuration item can only be configured in fe.conf and will take effect after restarting FE.
MasterOnly: Whether it's a configuration item unique to the Master FE node. If true, it means that this configuration item only makes sense in the Master FE node and has no meaning for other types of FE nodes. If false, it means that this configuration item is meaningful in all FE nodes.
Comment: description of the configuration item.
You can also open the FE front page http://fe_host:fe_http_port/variable in your browser. You can view the currently effective FE configuration items in Configure Info.

Setting Configuration Items

There are two ways to configure FE's configuration items:
1. Static Configuration Add and set configuration items in the conf/fe.conf file. The configuration items in fe.conf will be read at the start of the FE process. Configuration items not in fe.conf will use the default value.
2. Dynamic Configuration Through the MySQL Protocol After FE starts, you can set configuration items dynamically with the following command. This command requires administrative rights.
ADMIN SET FRONTEND CONFIG ("fe_config_name" = "fe_config_value");
Not all configuration items support dynamic configuration. By using the ADMIN SHOW FRONTEND CONFIG; command, the IsMutable column of command results reveals whether it supports dynamic configuration. Configuration items modified in this way will be invalidated after the restart of the FE process. For more help with this command, the HELP ADMIN SET CONFIG; command can provide information.
3. Dynamic Configuration Through the HTTP Protocol For more specific details, please refer to Set Config Action. This method can also persistently modify the configuration items. The configuration items will be persisted in the fe_custom.conf file, and they will still be effective after FE restarts.

Application Example

1. Modifying async_pending_load_task_pool_size With ADMIN SHOW FRONTEND CONFIG;, you can see that this configuration item cannot be dynamically configured (IsMutable is false). You need to add async_pending_load_task_pool_size=20 in fe.conf, then restart the FE process to apply this configuration.
2. Modifying dynamic_partition_enable With ADMIN SHOW FRONTEND CONFIG;, you can see that this configuration item can be dynamically configured (IsMutable is true) and it is a configuration unique to Master FE. First, we can connect to any FE and execute the following command to modify the configuration:
ADMIN SET FRONTEND CONFIG ("dynamic_partition_enable" = "true");`
Then you can use the following command to check the modified value:
set forward_to_master=true;
ADMIN SHOW FRONTEND CONFIG;
After you modify it in this way, if the Master FE restarts or a Master switch happens, the configuration will become invalid. This configuration can be permanently enabled by directly adding the configuration item in fe.conf and restarting FE.
3. Modifying max_distribution_pruner_recursion_depth With ADMIN SHOW FRONTEND CONFIG;, you can see that this configuration item can be dynamically configured (IsMutable is true) and it is not a configuration unique to Master FE. Similarly, we can modify this configuration through the command to modify the configuration dynamically. Since this configuration is not unique to the Master FE, you need to connect separately to different FEs and dynamically modify the configuration. This ensures that all FEs use the modified configuration value.

Configuration Item List

For a detailed list of configuration items applicable to FE, see FE Configuration Items.

BE Parameter Configuration

The configuration file for BE, be.conf, is usually located in the conf/ directory of the BE deployment path.
Another configuration file, be_custom.conf, is used to record configuration items that users dynamically configure and persist during running.
After the BE process starts, it will first read the configuration items in be.conf, and then read the configuration items in be_custom.conf. The configuration items in be_custom.conf will overwrite the same items in be.conf.

Viewing Configuration Items

Users can view the current configuration items by accessing the BE Web page at http://be_host:be_webserver_port/varz

Setting Configuration Items

There are two ways to configure BE's configuration items:
1. Static Configuration Add and set configuration items in the conf/be.conf file. The configuration items in be.conf will be read when BE starts. Items not in be.conf will use the default values.
2. Dynamic Configuration After BE starts, the following command can be used to dynamically set configuration items.
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}'
The following command can be used to persist modifications to the configuration. The modified configuration items will be stored in the be_custom.conf file.
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}&persist=true

Application Example

1. Modifying max_base_compaction_concurrency in a static way Add max_base_compaction_concurrency=5 in the be.conf file, and then restart the BE process to apply the configuration.
2. Modifying streaming_load_max_mb dynamically After BE starts, use the following command to dynamically set the configuration item streaming_load_max_mb:
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?streaming_load_max_mb=1024
If the return value is as follows, the setting is successful.
{
"status": "OK",
"msg": ""
}
The configuration will lose its effect after the BE is restarted. If you want to persist modifications, use the following command:
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?streaming_load_max_mb=1024\\&persist=true

Configuration Item List

For a detailed list of configuration items applicable to BE, see BE Configuration Items.

User Configuration Items

The User level configuration is only valid for individual users. Each user can set their own user properties, which will not affect each other.

Viewing Configuration Items

After FE starts, users can view a User's configuration items in the MySQL client using the following command: SHOW PROPERTY [FOR user] [LIKE key pattern] ; For specific syntax, use the command help show property;.

Setting Configuration Items

After FE starts, in the MySQL client, use the following command to modify a User's configuration items: SET PROPERTY [FOR 'user'] 'key' = 'value' [, 'key' = 'value'] ; For specific syntax, use the command help set property;.
User-level configuration items will only be effective for specified users and will not affect the configuration of other users.

Application Example

1. Modify user Billie's max_user_connections. Use SHOW PROPERTY FOR 'Billie' LIKE '%max_user_connections%'; to view the current maximum number of connections for user Billie, which is 100. Use SET PROPERTY FOR 'Billie' 'max_user_connections' = '200'; to change the current maximum number of connections for user Billie to 200.

Configuration Item List

For a detailed list of user configuration items, see User Configuration Items.


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan