設定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 BucketARN,格式為acs:osstables:{region}:{uid}:bucket/{bucket-name}

--type

string

維護類型,目前支援iceberg

--value

string

維護配置的值,JSON格式。

說明

--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