Trino 配置管理
重要
AKS 上的 Azure HDInsight 已于 2025 年 1 月 31 日停用。 了解更多 ,通过此公告。
需要将工作负荷迁移到 Microsoft Fabric 或等效的 Azure 产品,以避免工作负荷突然终止。
重要
此功能目前以预览版提供。 Microsoft Azure 预览版补充使用条款 包括适用于 Azure 功能的更多法律条款,这些功能处于 beta 版、预览版或其他尚未正式发布的状态。 有关此特定预览的信息,请参阅 Azure HDInsight on AKS 的预览信息。 有关问题或功能建议,请在 AskHDInsight 上提交请求,提供详细信息,并关注我们,以获取 Azure HDInsight 社区 的更多更新。
在 AKS 上使用 HDInsight 的 Trino 群集附带了开源 Trino 的大部分默认配置。 本文介绍如何更新配置文件,以及如何将自己的补充配置文件添加到群集。
可以通过两种方式添加/更新配置:
注意
在 AKS 上使用 HDInsight 的 Trino 强制实施某些配置,并禁止修改某些文件和/或属性。 这样做是为了确保通过配置实现适当的安全性和连接性。 禁止的文件/属性的示例包括但不限于:
- jvm.config 文件,但堆大小设置除外。
- Node.properties:node.id、node.data-dir、log.path 等。
Config.properties: http-server.authentication.*, http-server.https.* etc.
使用 Azure 门户
在 Azure 门户中,可以修改三组标准 Trino 配置:
- log.properties
- config.properties
- node.properties
按照步骤修改配置:
登录到 Azure 门户。
在 Azure 门户搜索栏中,键入“AKS 群集上的 HDInsight”,然后从下拉列表中选择“AKS 群集上的 Azure HDInsight”。
从列表页中选择群集名称。
导航到“配置管理”面板。
显示 Azure 门户配置管理的
为要修改的配置添加新或更新现有键值对。 例如,config.properties -> 自定义配置 -> 单击“添加”以添加新配置设置,然后单击“确定”。
显示自定义配置的
单击“保存”保存配置。
使用 ARM 模板
先决条件
- AKS 上集成 HDInsight 的运行中的 Trino 群集。
- 为群集创建 ARM 模板。
- 查看完整的群集 ARM 模板 示例。
- 熟悉 ARM 模板创作和部署。
群集管理
可以在 properties.clusterProfile
下的 serviceConfigsProfiles.serviceName[“trino”]
中指定所有 Trino 配置。
以下示例重点介绍 coordinator/worker/miscfiles
。 有关目录,请参阅 将目录添加到现有群集:
"serviceConfigsProfiles": [
{
"serviceName": "trino",
"configs": [
{
"component": "catalogs",
"files": [<file-spec>,…]
},
{
"component": "coordinator",
"files": [<file-spec>,…]
},
{
"component": "worker",
"files": [<file-spec>,…]
},
{
"component": " miscfiles",
"files": [<file-spec>,…]
},
]
}
]
有几个组件控制不同的配置方面:
组件名称 | 每个文件规格的必需/允许属性 | 描述 |
---|---|---|
常见 |
filename ,values |
包含协调器和辅助角色的配置文件。 |
协调者 |
filename ,values |
仅包含协调器配置文件,重写常见(如果存在)。 |
工人 |
filename ,values |
仅包含工作进程的配置文件,在存在时重写通用配置。 |
miscfiles |
filename ,content |
包含用户为整个群集提供的其他配置文件。 |
目录 |
filename 内容或值 |
包含整个群集的目录文件。 |
以下示例演示:
- 替代群集的默认 node.environment(在 Trino UI 中显示)。
- 替代协调器和辅助角色的默认 config.properties 值。
- 将示例 资源组的 json 添加进来,并配置协调器以使用这些资源组。
"serviceConfigsProfiles": [
{
"serviceName": "trino",
"configs": [
{
"component": "common",
"files": [
{
"fileName": "node.properties",
"values": {
"node.environment": "preview"
}
},
{
"fileName": "config.properties",
"values": {
"join-distribution-type": "AUTOMATIC",
"query.max-execution-time": "5d",
"shutdown.grace-period": "5m"
}
}
]
},
{
"component": "coordinator",
"files": [
{
"fileName": "resource-groups.properties",
"values": {
"resource-groups.configuration-manager": "file",
"resource-groups.config-file": "${MISC:resource-groups}"
}
}
]
},
{
"component": "miscfiles",
"files": [
{
"fileName": "resource-groups",
"path": "/customDir/resource-groups.json",
"content": "{\"rootGroups\":[{\"name\":\"global\",\"softMemoryLimit\":\"80%\",\"hardConcurrencyLimit\":100,\"maxQueued\":1000,\"schedulingPolicy\":\"weighted\",\"jmxExport\":true,\"subGroups\":[{\"name\":\"data_definition\",\"softMemoryLimit\":\"10%\",\"hardConcurrencyLimit\":5,\"maxQueued\":100,\"schedulingWeight\":1},{\"name\":\"adhoc\",\"softMemoryLimit\":\"10%\",\"hardConcurrencyLimit\":50,\"maxQueued\":1,\"schedulingWeight\":10,\"subGroups\":[{\"name\":\"other\",\"softMemoryLimit\":\"10%\",\"hardConcurrencyLimit\":2,\"maxQueued\":1,\"schedulingWeight\":10,\"schedulingPolicy\":\"weighted_fair\",\"subGroups\":[{\"name\":\"${USER}\",\"softMemoryLimit\":\"10%\",\"hardConcurrencyLimit\":1,\"maxQueued\":100}]}]}]},{\"name\":\"admin\",\"softMemoryLimit\":\"100%\",\"hardConcurrencyLimit\":50,\"maxQueued\":100,\"schedulingPolicy\":\"query_priority\",\"jmxExport\":true}],\"selectors\":[{\"group\":\"global.adhoc.other.${USER}\"}],\"cpuQuotaPeriod\":\"1h\"}"
}
]
}
]
}
部署更新的 ARM 模板以反映群集中的更改。 了解如何 部署 ARM 模板。