Trino 組態管理
重要
此功能目前為預覽功能。 適用於 Microsoft Azure 預覽版的補充使用規定包含適用於 Beta 版、預覽版或尚未發行至正式運作之 Azure 功能的更合法條款。 如需此特定預覽的相關信息,請參閱 AKS 預覽資訊的 Azure HDInsight。 如需問題或功能建議,請在 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]。
從清單頁面選取叢集名稱。
流覽至 [組態管理] 刀鋒視窗。
針對您想要修改的組態,新增或更新現有的索引鍵值組。 例如,config.properties - 自定義組態 ->> 按兩下 [新增] 以新增組態設定,然後按兩下 [確定]。
按兩下 [儲存] 以儲存組態。
使用ARM範本
必要條件
- 在 AKS 上使用 HDInsight 的作業 Trino 叢集。
- 為您的叢集建立 ARM範本 。
- 檢閱完整的叢集 ARM 範 例。
- 熟悉 ARM 範本撰寫和部署。
叢集管理
所有 Trino 組態都可以在 下serviceConfigsProfiles.serviceName[“trino”]
properties.clusterProfile
指定。
下列範例著重於 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 |
包含用戶為整個叢集提供之其他組態檔。 |
catalogs | 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範本。
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: