在 Amazon Keyspaces 中停用 CDC 串流 - Amazon Keyspaces (適用於 Apache Cassandra)

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

在 Amazon Keyspaces 中停用 CDC 串流

若要停用金鑰空間中的 CDC 串流,您可以在 CQL、 update-table命令與 AWS CLI或 主控台中使用 ALTER TABLE陳述式。

Cassandra Query Language (CQL)
使用 CQL 停用串流 (CDC 串流)
  1. 若要停用串流,您可以使用下列陳述式。

    ALTER TABLE mykeyspace.mytable WITH cdc = FALSE;
  2. 若要確認串流已停用,您可以使用下列陳述式。

    SELECT keyspace_name, table_name, cdc, custom_properties FROM system_schema_mcs.tables WHERE keyspace_name = 'mykeyspace' AND table_name = 'mytable';

    該陳述式的輸出看起來與此類似。

    keyspace_name | table_name | cdc | custom_properties ---------------+------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ mykeyspace | mytable | False | {'capacity_mode': {'last_update_to_pay_per_request_timestamp': '1741385668642', 'throughput_mode': 'PAY_PER_REQUEST'}, 'encryption_specification': {'encryption_type': 'AWS_OWNED_KMS_KEY'}, 'point_in_time_recovery': {'status': 'disabled'}}
CLI
使用 停用串流 (CDC 串流) AWS CLI
  1. 若要停用串流,您可以使用下列命令。

    aws keyspaces update-table \ --keyspace-name 'mykeyspace' \ --table-name 'mytable' \ --cdc-specification status=DISABLED
  2. 命令的輸出看起來與此範例類似。

    { "keyspaceArn": "arn:aws:cassandra:us-east-1:111122223333:/keyspace/my_keyspace/", "streamName": "my_stream" }
Console
使用 Amazon Keyspaces 主控台停用串流 (CDC 串流)
  1. 登入 AWS Management Console,並在 https://https://console.aws.amazon.com/keyspaces/home 開啟 Amazon Keyspaces 主控台。

  2. 在導覽窗格中,選擇資料表,然後從清單中選擇資料表。

  3. 選擇串流索引標籤。

  4. 選擇編輯

  5. 取消選取開啟串流

  6. 選擇儲存變更以停用串流。