

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon Keyspaces テーブルのウォームスループットを表示する
<a name="view-warm-throughput"></a>

コンソール、CQL、または を使用して、Amazon Keyspaces テーブルの現在のウォームスループット値を表示できます AWS CLI。

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

**コンソールを使用してテーブルの事前ウォーミング設定を表示する方法。**

1. にサインインし AWS マネジメントコンソール、[https://console.aws.amazon.com/keyspaces/home](https://console.aws.amazon.com/keyspaces/home) で Amazon Keyspaces コンソールを開きます。

1. ナビゲーションペインで、**テーブル**を選択し、確認するテーブルを選択します。

1. テーブルの**キャパシティ**タブで、**テーブルの事前ウォーミング**に進みます。

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

**CQL を使用してテーブルのウォームスループット設定を表示する**
+ テーブルのウォームスループット設定を表示するには、次の CQL ステートメントを使用できます。

  ```
  SELECT custom_properties
  FROM system_schema_mcs.tables 
  WHERE keyspace_name='catalog' and table_name='book_awards';
  
  // Output:
  ...
  custom_properties
  ----------------------------------------------------------------------------------
  {
      'warm_throughput': 
      {
          'read_units_per_second': '40000', 
          'write_units_per_second': '20000', 
          'status': 'AVAILABLE'
      }
  }
  ...
  ```

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

**を使用してテーブルのウォームスループット設定を表示する AWS CLI**
+ 次の例に示すように、 `get-table` コマンドを使用してテーブルのウォームスループット設定を表示できます。

  ```
  aws keyspaces get-table \
  --keyspace-name 'catalog' \
  --table-name 'book_awards'
  ```

  以下は、プロビジョニングモードの単一リージョンテーブルの `get-table` コマンドの出力例を示しています。

  ```
  {
      "keyspaceName": "catalog",
      "tableName": "book_awards",
      ... Existing Fields ...,
      "capacitySpecificationSummary": {
          "throughputMode": "PROVISIONED",
          "readCapacityUnits": 20000,
          "writeCapacityUnits": 10000
      },
      "warmThroughputSpecificationSummary": {
          "readUnitsPerSecond": 40000,
          "writeUnitsPerSecond": 20000,
          "status": "AVAILABLE"
      }
  }
  ```

  オンデマンドモードの単一リージョンテーブルの出力例を次に示します。

  ```
  {
      "keyspaceName": "catalog",
      "tableName": "book_awards_ondemand",
      ... Existing Fields ...,
      "capacitySpecification": {
          "throughputMode": "PAY_PER_REQUEST"
      },
      "warmThroughputSpecificationSummary": {
          "readUnitsPerSecond": 40000,
          "writeUnitsPerSecond": 20000,
          "status": "AVAILABLE"
      }
  }
  ```

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

**SDK for Java を使用して、テーブルの事前ウォーミング設定を読み取ります。**
+ を使用してテーブルのウォームスループット値を読み取ります`get-table`。次のコード例は、この例です。

  ```
  import software.amazon.awssdk.services.keyspaces.KeyspacesClient;
  import software.amazon.awssdk.services.keyspaces.model.*;
  
  public class GetTableWithPreWarmingExample {
      public static void main(String[] args) {
          KeyspacesClient keyspacesClient = KeyspacesClient.builder().build();
  
          // Get table details including PreWarming specification
          GetTableRequest request = GetTableRequest.builder()
              .keyspaceName("catalog")
              .tableName("book_awards")
              .build();
              
          GetTableResponse response = keyspacesClient.getTable(request);
          
          // Access PreWarming details
          if (response.warmThroughputSpecification() != null) {
              WarmThroughputSpecificationSummary warmThroughputSummary = response.warmThroughputSpecification();
              System.out.println("PreWarming Status: " + warmThroughputSummary.status());
              System.out.println("Read Units: " + warmThroughputSummary.readUnitsPerSecond());
              System.out.println("Write Units: " + warmThroughputSummary.writeUnitsPerSecond());
              
              // Check if PreWarming is active
              if (warmThroughputSummary.status().equals("AVAILABLE")) {
                  System.out.println("Table is fully pre-warmed and ready for high throughput");
              } else if (warmThroughputSummary.status().equals("UPDATING")) {
                  System.out.println("Table PreWarming is currently being updated");
              }
          } else {
              System.out.println("Table does not have PreWarming enabled");
          }
      }
  }
  ```

------