

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 增加现有 Amazon Keyspaces 表的热吞吐量
<a name="update-warm-throughput"></a>

您可以使用控制台、CQL 或来增加 Amazon Keyspaces 表的当前热吞吐量值。 AWS CLI

------
#### [ Console ]

**如何使用控制台增加桌子的预热设置**

1. 登录并打开 Amazon Keyspaces 控制台，网址为。 AWS 管理控制台[https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home)

1. 在导航窗格中，选择**表**，然后选择要更新的表。

1. 在表格的 “**容量**” 选项卡上，继续Pre-warming 执行**表格**。

1. 在**Pre-warming 表格**部分中，选择**编辑**。

1. 在 **“编辑表格的预热**” 页面上，您可以更新每秒**读取单位数和每秒****写入单位数**的值。

1. 选择**保存更改**。您的桌子正在使用指定的预热设置进行更新。

------
#### [ Cassandra Query Language (CQL) ]

**使用 CQL 增加表的热吞吐量设置**
+ 使用`ALTER TABLE`语句来增加表的热吞吐量。下面是一个示例语句。

  ```
  ALTER TABLE catalog.book_awards 
  WITH CUSTOM_PROPERTIES = {
      'warm_throughput': {  
          'read_units_per_second': 60000,  
          'write_units_per_second': 30000  
      }
  };
  ```

  要确认表中更新的容量设置，请参阅[查看 Amazon Keyspaces 表的热吞吐量](view-warm-throughput.md)。

------
#### [ CLI ]

**使用增加桌子的预热设置 AWS CLI**
+ 要增加表格的热吞吐量，可以使用命令。`update-table`下面是一个示例语句。

  ```
  aws keyspaces update-table \
  --keyspace-name 'catalog' \
  --table-name 'book_awards' \
  --warmThroughputSpecification readUnitsPerSecond=60000,writeUnitsPerSecond=30000
  ```

  要确认表中更新的容量设置，请参阅[查看 Amazon Keyspaces 表的热吞吐量](view-warm-throughput.md)。

------
#### [ Java ]

**使用适用于 Java 的 SDK 更新表格的预热设置。**
+ 更新表的热吞吐量设置。以下代码示例就是一个例子。

  ```
  import software.amazon.awssdk.services.keyspaces.KeyspacesClient;
  import software.amazon.awssdk.services.keyspaces.model.*;
  
  public class UpdatePreWarmingExample {
      public static void main(String[] args) {
          KeyspacesClient keyspacesClient = KeyspacesClient.builder().build();
  
          // Define new warm throughput specification
          WarmThroughputSpecification warmThroughput = WarmThroughputSpecification.builder()
              .readUnitsPerSecond(60000L)
              .writeUnitsPerSecond(30000L)
              .build();
  
          // Update table with new PreWarming settings
          UpdateTableRequest request = UpdateTableRequest.builder()
              .keyspaceName("catalog")
              .tableName("book_awards")
              .warmThroughputSpecification(warmThroughput)
              .build();
              
          UpdateTableResponse response = keyspacesClient.updateTable(request);
          System.out.println("Table update requested: " + response.resourceArn());
      }
  }
  ```

------