使用其他檔案
重要
此功能目前為預覽功能。 適用於 Microsoft Azure 預覽版的補充使用規定包含適用於 Beta 版、預覽版或尚未發行至正式運作之 Azure 功能的更合法條款。 如需此特定預覽的相關信息,請參閱 AKS 預覽資訊的 Azure HDInsight。 如需問題或功能建議,請在 AskHDInsight 上提交要求,並提供詳細數據,並遵循我們在 Azure HDInsight 社群上取得更多更新。
本文提供如何指定及使用其他檔案組態的詳細數據。
您可以使用 ARM 範本,在叢集中新增使用其他檔案的設定。 如需更廣泛的範例,請參閱 服務組態。
必要條件
- 在 AKS 上使用 HDInsight 的作業 Trino 叢集。
- 為您的叢集建立 ARM範本 。
- 檢閱完整的叢集 ARM 範 例。
- 熟悉 ARM 範本撰寫和部署。
新增其他檔案
ARM 樣本中元件中的每個miscfiles
clusterProfile.serviceConfigsProfiles
檔案規格都需要:
fileName
:要作為其他組態中參考之檔案的符號名稱。 此名稱不是實體檔名。 若要在其他組態中使用指定的其他檔案,請在 AKS 上指定${MISC:\<fileName\>}
和 HDInsight 將此標籤取代為運行時間提供值的實際檔案路徑必須滿足下列條件:- 包含不超過 253 個字元
- 只包含小寫英數位元,
-
或.
- 以英數位元開頭和結尾
path
:如果適用的話,包括檔名和擴展名的相對檔案路徑。 在 AKS 上使用 HDInsight 的 Trino 只會保證每個指定其他檔案相對於其他檔案的位置,基底目錄可能會變更。 您無法假設其他檔案的絕對路徑有任何內容,不同之處在於它以 「path」 屬性中指定的值結尾。content
:具有檔案內容的 JSON 逸出字串。 內容的格式是特定 Trino 功能特有的,例如,資源群組的 json 可能會有所不同。
注意
設定錯誤可能會防止 Trino 叢集啟動。 請小心新增組態。
下列範例示範
- 新增範例 資源群組 json,並設定協調器以使用它。
"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範本。