共用方式為


使用其他檔案

重要

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

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

重要

這項功能目前為預覽狀態。 Microsoft Azure 預覽版的補充使用規定 包含適用於 Beta 版、預覽版或尚未正式發行之 Azure 功能的更合法條款。 如需此特定預覽的相關資訊,請參閱 AKS 預覽資訊上的 Azure HDInsight。 如有問題或功能建議,請提交要求至 AskHDInsight,並請關注我們以取得 Azure HDInsight 社群的更多更新。

本文提供如何指定及使用其他檔案組態的詳細數據。

您可以使用 ARM 範本,在叢集中新增使用其他檔案的設定。 如需更廣泛的範例,請參閱 服務組態

先決條件

新增其他檔案

ARM 樣本中 clusterProfile.serviceConfigsProfilesmiscfiles 元件中的每個檔案規格都需要:

  • fileName:要作為其他組態中參考之檔案的符號名稱。 此名稱不是實體檔名。 若要在其他組態中使用指定的雜項檔案,請在 AKS 上指定 ${MISC:\<fileName\>},HDInsight 將在運行時將此標記替換為實際的檔案路徑,且提供的值必須滿足以下條件:

    • 包含不超過 253 個字元
    • 只包含小寫英數字元、-.
    • 以英數位元開頭和結尾
  • path:適用的相對檔案路徑,包括檔名和擴展名。 在 AKS 上,使用 Trino 與 HDInsight 只能保證每一個指定的非特定檔案相對於其他非特定檔案的位置,也就是說,基底目錄可能會改變。 您不能假設其他檔案的絕對路徑資訊,唯一可以假設的是它會以「path」屬性中指定的值作為結尾。

  • content:具有檔案內容的 JSON 逸出字串。 內容格式可能會因為不同的 Trino 功能而異,例如,資源群組的 json

注意

設定錯誤可能會防止 Trino 叢集啟動。 注意在新增配置時要小心。

下列範例示範

"serviceConfigsProfiles": [
    {
        "serviceName": "trino",
        "configs": [
            {
                "component": "common",
                "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 範本