

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

# Amazon Keyspaces 中的系统键空间
<a name="working-with-keyspaces"></a>

亚马逊密钥空间（适用于 Apache Cassandra）中的系统密钥空间和系统表是只读资源，用于存储有关您的亚马逊密钥空间资源的元数据。无论您是否创建了任何密钥空间或 AWS 账户表，系统密钥空间都存在于每个密钥空间中。它们是 Apache Cassandra 的兼容功能，而且免费提供。

您无法修改或删除系统密钥空间。Amazon Keyspaces 控制台仅显示用户创建的密钥空间。系统密钥空间可通过 CQL 以编程方式进行访问，并出现在和等服务中。 AWS CloudFormation AWS Config

Amazon Keyspaces 使用四个系统键空间：
+ `system`
+ `system_schema`
+ `system_schema_mcs`
+ `system_multiregion_info`

以下各节提供了有关 Amazon Keyspaces 支持的系统键空间和系统表的详细信息。

## `system`
<a name="keyspace_system_list"></a>

这是一个 Cassandra 键空间。Amazon Keyspaces 使用以下表。


| 表名称 | 列名称 | 评论 | 
| --- | --- | --- | 
|  `local`  |  `key, bootstrapped, broadcast_address, cluster_name, cql_version, data_center, gossip_generation, host_id, listen_address, native_protocol_version, partitioner, rack, release_version, rpc_address, schema_version, thrift_version, tokens, truncated_at`  |  有关本地键空间的信息。  | 
|  `peers`  |  `peer, data_center, host_id, preferred_ip, rack, release_version, rpc_address, schema_version, tokens`  |  查询此表可查看可用的端点。例如，如果通过公有端点进行连接，则会看到包含九个可用 IP 地址的列表。如果通过 FIPS 端点进行连接，则会看到包含三个 IP 地址的列表。如果您通过 AWS PrivateLink VPC 终端节点进行连接，则会看到已配置的 IP 地址列表。有关更多信息，请参阅 [使用接口 VPC 端点信息填充 `system.peers` 表条目](vpc-endpoints.md#system_peers)。  | 
|  `size_estimates`  |  `keyspace_name, table_name, range_start, range_end, mean_partition_size, partitions_count`  | 此表定义了每个表的每个令牌范围的总大小和分区数。Apache Cassandra Spark Connector 需要此表，它使用估算的分区大小来分配工作。 | 
|  `prepared_statements`  |  `prepared_id, logged_keyspace, query_string`  |  此表包含有关已保存查询的信息。  | 

## `system_schema`
<a name="keyspace_system_schema"></a>

这是一个 Cassandra 键空间。Amazon Keyspaces 使用以下表。


| 表名称 | 列名称 | 评论 | 
| --- | --- | --- | 
|  `keyspaces`  |  `keyspace_name, durable_writes, replication`  |  有关特定键空间的信息。  | 
|  `tables`  |  `keyspace_name, table_name, bloom_filter_fp_chance, caching, comment, compaction, compression, crc_check_chance, dclocal_read_repair_chance, default_time_to_live, extensions, flags, gc_grace_seconds, id, max_index_interval, memtable_flush_period_in_ms, min_index_interval, read_repair_chance, speculative_retry`  |  有关特定表的信息。  | 
|  `types`  |  `keyspace_name, type_name, field_names, field_types`  |  有关特定用户定义类型 (UDT) 的信息。  | 
|  `columns`  |  `keyspace_name, table_name, column_name, clustering_order, column_name_bytes, kind, position, type`  |  有关特定列的信息。  | 

## `system_schema_mcs`
<a name="keyspace_system_schema_mcs"></a>

这是一个 Amazon Keyspaces 密钥空间，用于存储有关或 AWS 亚马逊密钥空间特定设置的信息。


| 表名称 | 列名称 | 评论 | 
| --- | --- | --- | 
|  `keyspaces`  |  `keyspace_name, durable_writes, replication`  |  查询此表可以编程方式了解是否已创建键空间。有关更多信息，请参阅 [在 Amazon Keyspaces 中查看键空间的创建状态](keyspaces-create.md)。  | 
|  `tables`  |  `keyspace_name, creation_time, speculative_retry, cdc, gc_grace_seconds, crc_check_chance, min_index_interval, bloom_filter_fp_chance, flags, custom_properties, dclocal_read_repair_chance, table_name, caching, default_time_to_live, read_repair_chance, max_index_interval, extensions, compaction, comment, id, compression, memtable_flush_period_in_ms, cdc_specification, latest_stream_arn status`  |  查询此表可了解特定表的状态。有关更多信息，请参阅 [在 Amazon Keyspaces 中查看表的创建状态](tables-create.md)。 您也可以查询此表来列出存储为 `custom_properties` 的 Amazon Keyspaces 特定设置。例如： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/keyspaces/latest/devguide/working-with-keyspaces.html)  | 
|  `tables_history`  |  `keyspace_name, table_name, event_time, creation_time, custom_properties, event`  |  查询此表可了解特定表的模式更改。  | 
|  `columns`  |  `keyspace_name, table_name, column_name, clustering_order, column_name_bytes, kind, position, type`  |  此表与 `system_schema` 键空间中的 Cassandra 表相同。  | 
|  `tags`  |  `resource_id, keyspace_name, resource_name, resource_type, tags`  |  查询此表可了解键空间是否具有标签。有关更多信息，请参阅 [查看表的标签](Tagging.Operations.view.table.md)。  | 
|  `types`  |  `keyspace_name, type_name, field_names, field_types, max_nesting_depth, last_modified_timestamp, status, direct_referring_tables, direct_parent_types`  |  查询此表以了解有关用户定义类型的信息 (UDTs)。例如，您可以查询此表以列出给定密钥空间的所有 UDTs 内容。有关更多信息，请参阅 [Amazon Keys UDTs paces 中的用户定义类型 ()](udts.md)。  | 
|  `autoscaling`  |  `keyspace_name, table_name, provisioned_read_capacity_autoscaling_update, provisioned_write_capacity_autoscaling_update`  |  查询此表以获取预置表的自动扩缩设置。请注意，在表处于活动状态之后，这些设置才可用。要查询此表，必须在 `WHERE` 子句中指定 `keyspace_name` 和 `table_name`。有关更多信息，请参阅 [查看表的 Amazon Keyspaces 自动扩缩配置](autoscaling.viewPolicy.md)。  | 

## `system_multiregion_info`
<a name="keyspace_system_multiregion_info"></a>

这是一个 Amazon Keyspaces 密钥空间，用于存储有关多区域复制的信息。


| 表名称 | 列名称 | 评论 | 
| --- | --- | --- | 
|  `tables`  |  `keyspace_name, table_name, region, status`   |  此表包含有关多区域表的信息，例如，复制 AWS 区域 该表的位置和表的状态。您也可以查询此表来列出存储为 `custom_properties` 的 Amazon Keyspaces 特定设置。例如： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/keyspaces/latest/devguide/working-with-keyspaces.html) 要查询此表，必须在 `WHERE` 子句中指定 `keyspace_name` 和 `table_name`。有关更多信息，请参阅 [在 Amazon Keyspaces 中创建多区域键空间](keyspaces-mrr-create.md)。  | 
|  `keyspaces`  |  `keyspace_name, region, status, tables_replication_progress`   |  此表包含有关向密钥空间添加副本的`ALTER KEYSPACE`操作进度的信息，例如，在新区域中已经创建了多少张表，还有多少表仍在进行中。有关示例，请参阅[向密钥空间添加新区域时检查复制进度](keyspaces-multi-region-replica-status.md)。  | 
|  `autoscaling`  |  `keyspace_name, table_name, provisioned_read_capacity_autoscaling_update, provisioned_write_capacity_autoscaling_update, region`  |  查询此表以获取多区域预置表的自动扩缩设置。请注意，在表处于活动状态之后，这些设置才可用。要查询此表，必须在 `WHERE` 子句中指定 `keyspace_name` 和 `table_name`。有关更多信息，请参阅 [在 Amazon Keyspaces 中更新多区域表的预置容量和自动扩缩设置](tables-mrr-autoscaling.md)。  | 
|  `types`  |  `keyspace_name, type_name, field_names, field_types, max_nesting_depth, last_modified_timestamp, status, direct_referring_tables, direct_parent_types, region`  |  查询此表以了解有关多区域密钥空间中用户定义类型 (UDTs) 的信息。例如，您可以查询此表以列出用于 UDTs 给定密钥空间的所有表副本及其各自 AWS 区域。有关更多信息，请参阅 [Amazon Keys UDTs paces 中的用户定义类型 ()](udts.md)。  | 