Files
doris/docs/en/sql-reference/sql-statements/Account Management/SET PROPERTY.md
Mingyu Chen 982b76c3c0 [Bug] Fix resource tag bug, add documents and some other bug fix (#6708)
1. Fix bug of UNKNOWN Operation Type 91
2. Support using resource_tag property of user to limit the usage of BE
3. Add new FE config `disable_tablet_scheduler` to disable tablet scheduler.
4. Add documents for resource tag.
5. Modify the default value of FE config `default_db_data_quota_bytes` to 1PB.
6. Add a new BE config `disable_compaction_trace_log` to disable the trace log of compaction time cost.
7. Modify the default value of BE config `remote_storage_read_buffer_mb` to 16MB
8. Fix `show backends` results error
9. Add new BE config `external_table_connect_timeout_sec` to set the timeout when connecting to odbc and mysql table.
10. Modify issue template to enable blank issue, for release note or other specific usage.
11. Fix a bug in alpha_row_set split_range() function.
2021-09-28 10:37:42 +08:00

4.1 KiB

title, language
title language
SET PROPERTY en

SET PROPERTY

Description

Syntax:

SET PROPERTY [FOR 'user'] 'key' = 'value' [, 'key' = 'value']

Set user attributes, including resources allocated to users, import cluster, etc. The user attributes set here are for user, not user_identity. That is to say, if two users 'jack'@'%' and 'jack'@'192%'are created through the CREATE USER statement, the SET PROPERTY statement can only be used for the jack user, not 'jack'@'%' or 'jack'@'192%'

Importing cluster is only applicable to Baidu internal users.

key:

Super user rights: max_user_connections: Maximum number of connections. max_query_instances: Maximum number of query instance user can use when query. sql_block_rules: set sql block rules。After setting, if the query user execute match the rules, it will be rejected. cpu_resource_limit: limit the cpu resource usage of a query. See session variable cpu_resource_limit. resource.cpu_share: cpu resource assignment.(Derepcated) Load_cluster. {cluster_name}. priority: assigns priority to a specified cluster, which can be HIGH or NORMAL resource_tags: Specify the user's resource tag permissions.

Ordinary user rights: Quota.normal: Resource allocation at the normal level. Quota.high: Resource allocation at the high level. Quota.low: Resource allocation at low level.

Load_cluster. {cluster_name}. hadoop_palo_path: The Hadoop directory used by Palo needs to store ETL programs and intermediate data generated by ETL for Palo to import. After the import is completed, the intermediate data will be automatically cleaned up, and the ETL program will be automatically reserved for next use. Load_cluster. {cluster_name}. hadoop_configs: configuration of hadoop, where fs. default. name, mapred. job. tracker, hadoop. job. UGI must be filled in. Load_cluster. {cluster_name}. hadoop_port: Hadoop HDFS name node http} Default_load_cluster: The default import cluster.

example

  1. Modify the maximum number of user jacks to 1000 SET PROPERTY FOR 'jack' 'max_user_connections' = '1000';

  2. Modify the cpu_share of user Jack to 1000 SET PROPERTY FOR 'jack' 'resource.cpu_share' = '1000';

  3. Modify the weight of the normal group of Jack users Set property for 'jack''quota. normal' = 400';

  4. Add import cluster for user jack SET PROPERTY FOR 'jack' 'load 'cluster.{cluster name}.hadoop' palo path' ='/user /palo /palo path', 'load_cluster.{cluster_name}.hadoop_configs' = 'fs.default.name=hdfs://dpp.cluster.com:port;mapred.job.tracker=dpp.cluster.com:port;hadoop.job.ugi=user,password;mapred.job.queue.name=job_queue_name_in_hadoop;mapred.job.priority=HIGH;';

  5. Delete the import cluster under user jack. SET PROPERTY FOR 'jack' 'load_cluster.{cluster_name}' = '';

  6. Modify user jack's default import cluster SET PROPERTY FOR 'jack' 'default_load_cluster' = '{cluster_name}';

  7. Modify the cluster priority of user Jack to HIGH SET PROPERTY FOR 'jack' 'load_cluster.{cluster_name}.priority' = 'HIGH';

  8. Modify the maximum number of query instance for jack to 3000 SET PROPERTY FOR 'jack' 'max_query_instances' = '3000';

  9. Modify the sql block rule for jack SET PROPERTY FOR 'jack' 'sql_block_rules' = 'rule1, rule2';

  10. Modify the cpu resource usage limit for jack SET PROPERTY FOR 'jack' 'cpu_resource_limit' = '2';

  11. Modify user's resource tag permission SET PROPERTY FOR 'jack' 'resource_tags.location' = 'group_a, group_b';

keyword

SET, PROPERTY