Session Property Managers

Administrators can add session properties to control the behavior for subsets of their workload. These properties are defaults and can be overridden by users (if authorized to do so). Session properties can be used to control resource usage, enable or disable features, and change query characteristics. Session property managers are pluggable.

Add an etc/session-property-config.properties file with the following contents to enable the built-in manager that reads a JSON config file:

session-property-config.configuration-manager=file
session-property-manager.config-file=etc/session-property-config.json

Change the value of session-property-manager.config-file to point to a JSON config file, which can be an absolute path, or a path relative to the openLooKeng data directory.

This configuration file consists of a list of match rules, each of which specify a list of conditions that the query must meet, and a list of session properties that should be applied by default. All matching rules contribute to constructing a list of session properties. Rules are applied in the order they are specified. Rules specified later in the file override values for properties that have been previously encountered.

Match Rules

  • user (optional): regex to match against user name.
  • source (optional): regex to match against source string.
  • queryType (optional): string to match against the type of the query submitted:
  • DATA_DEFINITION: Queries that alter/create/drop the metadata of schemas/tables/views, and that manage prepared statements, privileges, sessions, and transactions.
    • DELETE: DELETE queries.
  • DESCRIBE: DESCRIBE, DESCRIBE INPUT, DESCRIBE OUTPUT, and SHOW queries.
    • EXPLAIN: EXPLAIN queries.
    • INSERT: INSERT and CREATE TABLE AS queries.
    • SELECT: SELECT queries.
  • clientTags (optional): list of tags. To match, every tag in this list must be in the list of client-provided tags associated with the query.
  • group (optional): regex to match against the fully qualified name of the resource group the query is routed to.
  • sessionProperties: map with string keys and values. Each entry is a system or catalog property name and corresponding value. Values must be specified as strings, no matter the actual data type.

Example

Consider the following set of requirements:

  • All queries running under the global resource group must have an execution time limit of 8 hours.
  • All interactive queries are routed to subgroups under the global.interactive group, and have an execution time limit of 1 hour (tighter than the constraint on global).
  • All ETL queries (tagged with ‘etl’) are routed to subgroups under the global.pipeline group, and must be configured with certain properties to control writer behavior.

These requirements can be expressed with the following rules:

[
  {
    "group": "global.*",
    "sessionProperties": {
      "query_max_execution_time": "8h",
    }
  },
  {
    "group": "global.interactive.*",
    "sessionProperties": {
      "query_max_execution_time": "1h"
    }
  },
  {
    "group": "global.pipeline.*",
    "clientTags": ["etl"],
    "sessionProperties": {
      "scale_writers": "true",
      "writer_min_size": "1GB"
    }
  }
]

有奖捉虫

“有虫”文档片段

0/500

存在的问题

文档存在风险与错误

● 拼写,格式,无效链接等错误;

● 技术原理、功能、规格等描述和软件不一致,存在错误;

● 原理图、架构图等存在错误;

● 版本号不匹配:文档版本或内容描述和实际软件不一致;

● 对重要数据或系统存在风险的操作,缺少安全提示;

● 排版不美观,影响阅读;

内容描述不清晰

● 描述存在歧义;

● 图形、表格、文字等晦涩难懂;

● 逻辑不清晰,该分类、分项、分步骤的没有给出;

内容获取有困难

● 很难通过搜索引擎,openLooKeng官网,相关博客找到所需内容;

示例代码有错误

● 命令、命令参数等错误;

● 命令无法执行或无法完成对应功能;

内容有缺失

● 关键步骤错误或缺失,无法指导用户完成任务,比如安装、配置、部署等;

● 逻辑不清晰,该分类、分项、分步骤的没有给出

● 图形、表格、文字等晦涩难懂

● 缺少必要的前提条件、注意事项等;

● 描述存在歧义

0/500

您对文档的总体满意度

非常不满意
非常满意

请问是什么原因让您参与到这个问题中

您的邮箱

创Issue赢奖品
根据您的反馈,会自动生成issue模板。您只需点击按钮,创建issue即可。
有奖捉虫