設定Table Bucket維護配置
更新時間:
Copy as MD
put-table-bucket-maintenance-configuration用於設定Table Bucket的維護配置,例如無引用檔案清理策略。
注意事項
維護配置用於控制Table Bucket的後台維護行為,目前--type僅支援
iceberg類型,用於開啟或關閉無引用檔案清理(Unreferenced File Cleanup)。--value參數需要傳入JSON格式的配置內容,可以通過命令列內聯JSON或使用
file://指定本地JSON檔案。
命令格式
ossutil tables-api put-table-bucket-maintenance-configuration --table-bucket-arn value --type value --value value [flags]參數 | 類型 | 說明 |
--table-bucket-arn | string | Table Bucket的ARN,格式為 |
--type | string | 維護類型,目前支援 |
--value | string | 維護配置的值,JSON格式。 |
說明
put-table-bucket-maintenance-configuration命令對應API介面PutTableBucketMaintenanceConfiguration。關於API中的具體參數含義,請參見PutTableBucketMaintenanceConfiguration。
關於支援的全域命令列選項,請參見ossutil全域選項。
--value參數的JSON文法如下:
{
"settings": {
"unreferenced_file_cleanup": {
"enabled": true
}
}
}使用樣本
設定Table Bucket的維護配置,維護類型為
iceberg,開啟無引用檔案清理。ossutil tables-api put-table-bucket-maintenance-configuration --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --type iceberg --value '{"settings":{"unreferenced_file_cleanup":{"enabled":true}}}'通過本地JSON檔案設定維護配置。將維護配置儲存為本地檔案
maintenance.json後,通過file://方式指定。ossutil tables-api put-table-bucket-maintenance-configuration --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --type iceberg --value file://maintenance.json
该文章对您有帮助吗?