共用方式為


Trino 組態管理

重要

AKS 上的 Azure HDInsight 於 2025 年 1 月 31 日淘汰。 透過此公告 深入瞭解

您必須將工作負載移轉至 Microsoft Fabric 或對等 Azure 產品,以避免突然終止工作負載。

重要

這項功能目前為預覽狀態。 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)

請遵循下列步驟來修改組態:

  1. 登入 Azure 入口網站

  2. 在 Azure 入口網站搜尋列中,輸入 「AKS 叢集上的 HDInsight」,然後從下拉式清單中選取 [AKS 叢集上的 Azure HDInsight]。

    顯示 AKS 叢集上 HDInsight 用戶入門搜尋選項的螢幕快照。

  3. 從清單頁面選取您的叢集名稱。

    螢幕快照顯示從清單中選取所需的 AKS 叢集上的 HDInsight。

  4. 導航至 [組態管理] 區域。

    顯示 Azure 入口網站組態管理的螢幕快照。

  5. 針對您想要修改的組態,新增或更新現有的索引鍵值組。 例如,config.properties -> 自定義組態 -> 按兩下 [新增] 以新增組態設定,然後按兩下 [確定]。

    顯示自訂設定的螢幕快照。

  6. 按兩下 [儲存] 以儲存組態。

    顯示如何儲存設定的螢幕快照。

使用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>,…]
            },
        ]
    }
]

有數個元件可控制不同的組態層面:

元件名稱 每個檔案規格的必要/允許屬性 描述
常見 filenamevalues 包含協調器和工作者的組態檔案。
協調者 filenamevalues 僅包含協調器的配置檔案,如果有共同配置檔案存在,則會覆蓋它們。
工人 filenamevalues 僅包含用於工作程序的組態檔,如果存在將覆寫一般的設定。
miscfiles filenamecontent 包含用戶為整個叢集提供之其他組態檔。
目錄 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 範本