diff --git a/CHANGELOG.md b/CHANGELOG.md index d2441b2f7..513fea12b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,6 +89,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added `terminated_early` to `count@200` ([#547](https://github.com/opensearch-project/opensearch-api-specification/pull/547)) - Added request and response schemas for `/_cluster/routing/awareness/{attribute}/weights` ([#524](https://github.com/opensearch-project/opensearch-api-specification/pull/524)) - Added request and response schemas for `/_cluster/decommission/awareness` ([#524](https://github.com/opensearch-project/opensearch-api-specification/pull/524)) +- Added `Bytes` component of type number ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552)) ### Changed @@ -104,6 +105,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Split test suite ([#472])(https://github.com/opensearch-project/opensearch-api-specification/pull/472) - Changed `WriteResponseBase`'s `_primary_term`, `_seq_no` & `_version` to have `int64` format ([#530](https://github.com/opensearch-project/opensearch-api-specification/pull/530)) - Adjust indices, shards cat API to test against unassigned indices ([#551](https://github.com/opensearch-project/opensearch-api-specification/pull/551)) +- Rename `Bytes` component to `StorageType` ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552)) +- Rename `ByteSize` to `StorageSize` ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552)) ### Deprecated diff --git a/spec/namespaces/cat.yaml b/spec/namespaces/cat.yaml index 833d71248..363b79a44 100644 --- a/spec/namespaces/cat.yaml +++ b/spec/namespaces/cat.yaml @@ -1105,7 +1105,7 @@ components: in: query description: The unit in which to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' cat.all_pit_segments::query.format: name: format in: query @@ -1164,7 +1164,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.allocation::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -1374,7 +1374,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.fielddata::query.fields: in: query @@ -1503,7 +1503,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.indices::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -1754,7 +1754,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.nodes::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -1924,7 +1924,7 @@ components: in: query description: The unit in which to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' cat.pit_segments::query.format: name: format in: query @@ -2062,7 +2062,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.recovery::query.detailed: in: query @@ -2233,7 +2233,7 @@ components: in: query description: The unit in which to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' cat.segment_replication::query.completed_only: name: completed_only in: query @@ -2365,7 +2365,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.segments::query.cluster_manager_timeout: name: cluster_manager_timeout @@ -2444,7 +2444,7 @@ components: name: bytes description: The unit used to display byte values. schema: - $ref: '../schemas/_common.yaml#/components/schemas/Bytes' + $ref: '../schemas/_common.yaml#/components/schemas/StorageType' style: form cat.shards::query.cluster_manager_timeout: name: cluster_manager_timeout diff --git a/spec/namespaces/indices.yaml b/spec/namespaces/indices.yaml index c57a5c12c..e3e0926f4 100644 --- a/spec/namespaces/indices.yaml +++ b/spec/namespaces/indices.yaml @@ -2385,10 +2385,10 @@ components: items: $ref: '../schemas/indices.data_streams_stats.yaml#/components/schemas/DataStreamsStatsItem' total_store_sizes: - $ref: '../schemas/_common.yaml#/components/schemas/ByteSize' + $ref: '../schemas/_common.yaml#/components/schemas/StorageSize' total_store_size_bytes: description: Total size, in bytes, of all shards for the selected data streams. - type: number + $ref: '../schemas/_common.yaml#/components/schemas/Bytes' required: - _shards - backing_indices diff --git a/spec/schemas/_common.yaml b/spec/schemas/_common.yaml index e97ac24df..e2528326e 100644 --- a/spec/schemas/_common.yaml +++ b/spec/schemas/_common.yaml @@ -686,7 +686,10 @@ components: $ref: '#/components/schemas/NodeId' NodeId: type: string - Bytes: + StorageSize: + type: string + pattern: '\d+(\.\d+)?(b|kb|k|mb|m|gb|g|tb|t|pb|p)' + StorageType: type: string enum: - b @@ -700,10 +703,8 @@ components: - pb - t - tb - ByteSize: - oneOf: - - type: number - - type: string + Bytes: + type: integer Percentage: oneOf: - type: string @@ -888,9 +889,9 @@ components: properties: size_in_bytes: description: Total amount, in bytes, of memory used for completion across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' size: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' fields: type: object additionalProperties: @@ -901,9 +902,9 @@ components: type: object properties: size: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' required: - size_in_bytes DocStats: @@ -928,9 +929,9 @@ components: evictions: type: number memory_size: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' memory_size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' fields: type: object additionalProperties: @@ -941,9 +942,9 @@ components: type: object properties: memory_size: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' memory_size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' required: - memory_size_in_bytes QueryCacheStats: @@ -964,10 +965,10 @@ components: description: Total count of query cache hits across all shards assigned to selected nodes. type: number memory_size: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' memory_size_in_bytes: description: Total amount, in bytes, of memory used for the query cache across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' miss_count: description: Total count of query cache misses across all shards assigned to selected nodes. type: number @@ -1032,15 +1033,24 @@ components: type: object description: The total amount of data uploaded to the remote translog store. properties: + failed: + description: The number of bytes that failed to upload to the remote translog store. + $ref: '#/components/schemas/StorageSize' failed_bytes: description: The number of bytes that failed to upload to the remote translog store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + started: + description: The number of bytes successfully uploaded to the remote translog store. + $ref: '#/components/schemas/StorageSize' started_bytes: description: The number of bytes successfully uploaded to the remote translog store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + succeeded: + description: The number of bytes successfully uploaded to the remote translog store. + $ref: '#/components/schemas/StorageSize' succeeded_bytes: description: The number of bytes successfully uploaded to the remote translog store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' required: - failed_bytes - started_bytes @@ -1049,6 +1059,9 @@ components: type: object description: Statistics related to uploads to the remote segment store. properties: + max_refresh_time_lag: + description: The maximum duration that the remote refresh is behind the local refresh. + $ref: '#/components/schemas/Duration' max_refresh_time_lag_in_millis: description: The maximum duration, in milliseconds, that the remote refresh is behind the local refresh. $ref: '#/components/schemas/DurationValueUnitMillis' @@ -1056,6 +1069,9 @@ components: $ref: '#/components/schemas/RemoteStoreUploadPressureStats' refresh_size_lag: $ref: '#/components/schemas/RemoteStoreUploadRefreshSizeLagStats' + total_time_spent: + description: The total amount of time, spent on uploads to the remote segment store. + $ref: '#/components/schemas/Duration' total_time_spent_in_millis: description: The total amount of time, in milliseconds, spent on uploads to the remote segment store. $ref: '#/components/schemas/DurationValueUnitMillis' @@ -1071,15 +1087,24 @@ components: type: object description: The amount of data, in bytes, uploaded or downloaded to/from the remote segment store. properties: + failed: + description: The number of bytes that failed to upload/upload to/from the remote segment store. + $ref: '#/components/schemas/StorageSize' failed_bytes: description: The number of bytes that failed to upload/upload to/from the remote segment store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + started: + description: The number of bytes to upload/download to/from the remote segment store after the upload/download has started. + $ref: '#/components/schemas/StorageSize' started_bytes: description: The number of bytes to upload/download to/from the remote segment store after the upload/download has started. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + succeeded: + description: The number of bytes successfully uploaded/downloaded to/from the remote segment store. + $ref: '#/components/schemas/StorageSize' succeeded_bytes: description: The number of bytes successfully uploaded/downloaded to/from the remote segment store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' required: - failed_bytes - started_bytes @@ -1097,12 +1122,18 @@ components: type: object description: The amount of lag during upload between the remote segment store and the local store. properties: + max: + description: The maximum amount of lag, in bytes, during the upload refresh between the remote segment store and the local store. + $ref: '#/components/schemas/StorageSize' max_bytes: description: The maximum amount of lag, in bytes, during the upload refresh between the remote segment store and the local store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + total: + description: The total number of bytes that lagged during the upload refresh between the remote segment store and the local store. + $ref: '#/components/schemas/StorageSize' total_bytes: description: The total number of bytes that lagged during the upload refresh between the remote segment store and the local store. - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' required: - max_bytes - total_bytes @@ -1113,6 +1144,9 @@ components: total_download_size: description: The total amount of data download from the remote segment store. $ref: '#/components/schemas/RemoteStoreUploadDownloadStats' + total_time_spent: + description: The total duration, spent on downloads from the remote segment store. + $ref: '#/components/schemas/Duration' total_time_spent_in_millis: description: The total duration, in milliseconds, spent on downloads from the remote segment store. $ref: '#/components/schemas/DurationValueUnitMillis' @@ -1123,11 +1157,11 @@ components: type: object properties: max_bytes_behind: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' max_replication_lag: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' total_bytes_behind: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' required: - max_bytes_behind - max_replication_lag @@ -1139,10 +1173,10 @@ components: description: Total number of segments across all shards assigned to selected nodes. type: number doc_values_memory: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' doc_values_memory_in_bytes: description: Total amount, in bytes, of memory used for doc values across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' file_sizes: description: |- This object is not populated by the cluster stats API. @@ -1151,55 +1185,62 @@ components: additionalProperties: $ref: 'indices.stats.yaml#/components/schemas/ShardFileSizeInfo' fixed_bit_set: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' fixed_bit_set_memory_in_bytes: description: Total amount of memory, in bytes, used by fixed bit sets across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' index_writer_memory: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' index_writer_max_memory_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' index_writer_memory_in_bytes: description: Total amount, in bytes, of memory used by all index writers across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' max_unsafe_auto_id_timestamp: description: Unix timestamp, in milliseconds, of the most recently retried indexing request. type: number memory: - $ref: '#/components/schemas/ByteSize' + description: Total amount, of memory used for segments across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' memory_in_bytes: description: Total amount, in bytes, of memory used for segments across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' norms_memory: - $ref: '#/components/schemas/ByteSize' + description: Total amount of memory used for normalization factors across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' norms_memory_in_bytes: description: Total amount, in bytes, of memory used for normalization factors across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' points_memory: - $ref: '#/components/schemas/ByteSize' + description: Total amount of memory used for points across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' points_memory_in_bytes: description: Total amount, in bytes, of memory used for points across all shards assigned to selected nodes. - type: number - stored_memory: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + stored_fields_memory: + description: Total amount of memory used for stored fields across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' stored_fields_memory_in_bytes: description: Total amount, in bytes, of memory used for stored fields across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' + terms_memory: + description: Total amount of memory used for terms across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' terms_memory_in_bytes: description: Total amount, in bytes, of memory used for terms across all shards assigned to selected nodes. - type: number - terms_memory: - $ref: '#/components/schemas/ByteSize' - term_vectory_memory: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/Bytes' + term_vectors_memory: + description: Total amount of memory used for term vectors across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' term_vectors_memory_in_bytes: description: Total amount, in bytes, of memory used for term vectors across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' version_map_memory: - $ref: '#/components/schemas/ByteSize' + description: Total amount of memory used by all version maps across all shards assigned to selected nodes. + $ref: '#/components/schemas/StorageSize' version_map_memory_in_bytes: description: Total amount, in bytes, of memory used by all version maps across all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' remote_store: $ref: '#/components/schemas/RemoteStoreStats' segment_replication: @@ -1222,15 +1263,15 @@ components: type: object properties: size: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' size_in_bytes: description: Total size, in bytes, of all shards assigned to selected nodes. - type: number + $ref: '#/components/schemas/Bytes' reserved: - $ref: '#/components/schemas/ByteSize' + $ref: '#/components/schemas/StorageSize' reserved_in_bytes: description: A prediction, in bytes, of how much larger the shard stores will eventually grow due to ongoing peer recoveries, restoring snapshots, and similar activities. - type: number + $ref: '#/components/schemas/Bytes' required: - reserved_in_bytes - size_in_bytes @@ -1480,7 +1521,7 @@ components: properties: total: type: number - time: + getTime: $ref: '#/components/schemas/Duration' time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' @@ -1561,21 +1602,21 @@ components: current_docs: type: number current_size: - type: string + $ref: '#/components/schemas/StorageSize' current_size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' total: type: number total_auto_throttle: - type: string + $ref: '#/components/schemas/StorageSize' total_auto_throttle_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' total_docs: type: number total_size: - type: string + $ref: '#/components/schemas/StorageSize' total_size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' total_stopped_time: $ref: '#/components/schemas/Duration' total_stopped_time_in_millis: @@ -1621,6 +1662,8 @@ components: properties: external_total: type: number + external_total_time: + $ref: '#/components/schemas/Duration' external_total_time_in_millis: $ref: '#/components/schemas/DurationValueUnitMillis' listeners: @@ -1645,9 +1688,9 @@ components: hit_count: type: number memory_size: - type: string + $ref: '#/components/schemas/StorageSize' memory_size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' miss_count: type: number required: @@ -1768,15 +1811,15 @@ components: remote_store: $ref: '#/components/schemas/RemoteStoreTranslogStats' size: - type: string + $ref: '#/components/schemas/StorageSize' size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' uncommitted_operations: type: number uncommitted_size: - type: string + $ref: '#/components/schemas/StorageSize' uncommitted_size_in_bytes: - type: number + $ref: '#/components/schemas/Bytes' required: - earliest_last_modified_age - operations @@ -1786,8 +1829,10 @@ components: RequestStats: type: object properties: + time: + $ref: '#/components/schemas/Duration' time_in_millis: - $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' + $ref: '#/components/schemas/DurationValueUnitMillis' current: type: number total: diff --git a/spec/schemas/cat.allocation.yaml b/spec/schemas/cat.allocation.yaml index ba6c82026..ba97dba01 100644 --- a/spec/schemas/cat.allocation.yaml +++ b/spec/schemas/cat.allocation.yaml @@ -16,44 +16,36 @@ components: description: |- Disk space used by the node's shards. Does not include disk space for the translog or unassigned shards. IMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index. - anyOf: - - $ref: '_common.yaml#/components/schemas/ByteSize' - - type: 'null' + type: ['null', string] disk.used: description: |- Total disk space in use. OpenSearch retrieves this metric from the node's operating system (OS). The metric includes disk space for: OpenSearch, including the translog and unassigned shards; the node's operating system; any other applications or files on the node. Unlike `disk.indices`, this metric does not double-count disk space for hard-linked files. - anyOf: - - $ref: '_common.yaml#/components/schemas/ByteSize' - - type: 'null' + type: ['null', string] disk.avail: description: |- Free disk space available to OpenSearch. OpenSearch retrieves this metric from the node's operating system. Disk-based shard allocation uses this metric to assign shards to nodes based on available disk space. - anyOf: - - $ref: '_common.yaml#/components/schemas/ByteSize' - - type: 'null' + type: ['null', string] disk.total: description: Total disk space for the node, including in-use and available space. - anyOf: - - $ref: '_common.yaml#/components/schemas/ByteSize' - - type: 'null' + type: ['null', string] disk.percent: description: Total percentage of disk space in use. Calculated as `disk.used / disk.total`. - anyOf: + oneOf: - $ref: '_common.yaml#/components/schemas/Percentage' - type: 'null' host: description: Network host for the node. Set using the `network.host` setting. - anyOf: + oneOf: - $ref: '_common.yaml#/components/schemas/Host' - type: 'null' ip: description: IP address and port for the node. - anyOf: + oneOf: - $ref: '_common.yaml#/components/schemas/Ip' - type: 'null' node: diff --git a/spec/schemas/cat.nodes.yaml b/spec/schemas/cat.nodes.yaml index 54816b7eb..80109fedf 100644 --- a/spec/schemas/cat.nodes.yaml +++ b/spec/schemas/cat.nodes.yaml @@ -38,11 +38,11 @@ components: description: The Java version. type: string disk.total: - $ref: '_common.yaml#/components/schemas/ByteSize' + type: string disk.used: - $ref: '_common.yaml#/components/schemas/ByteSize' + type: string disk.avail: - $ref: '_common.yaml#/components/schemas/ByteSize' + type: string disk.used_percent: $ref: '_common.yaml#/components/schemas/Percentage' heap.current: diff --git a/spec/schemas/cat.segments.yaml b/spec/schemas/cat.segments.yaml index 16ef0357a..177c74e40 100644 --- a/spec/schemas/cat.segments.yaml +++ b/spec/schemas/cat.segments.yaml @@ -44,9 +44,9 @@ components: Also, OpenSearch creates extra deleted documents to internally track the recent history of operations on a shard. type: string size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' size.memory: - $ref: '_common.yaml#/components/schemas/ByteSize' + type: string committed: description: |- If `true`, the segment is synced to disk. diff --git a/spec/schemas/cluster.allocation_explain.yaml b/spec/schemas/cluster.allocation_explain.yaml index 21157b311..ec55c7cac 100644 --- a/spec/schemas/cluster.allocation_explain.yaml +++ b/spec/schemas/cluster.allocation_explain.yaml @@ -47,7 +47,9 @@ components: shard_sizes: type: object additionalProperties: - type: number + oneOf: + - $ref: '_common.yaml#/components/schemas/Bytes' + - $ref: '_common.yaml#/components/schemas/StorageSize' shard_data_set_sizes: type: object additionalProperties: @@ -83,12 +85,18 @@ components: properties: path: type: string + total: + $ref: '_common.yaml#/components/schemas/StorageSize' total_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + used: + $ref: '_common.yaml#/components/schemas/StorageSize' used_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + free: + $ref: '_common.yaml#/components/schemas/StorageSize' free_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' free_disk_percent: type: number used_disk_percent: @@ -180,7 +188,7 @@ components: in_sync: type: boolean matching_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' matching_sync_id: type: boolean store_exception: diff --git a/spec/schemas/cluster.stats.yaml b/spec/schemas/cluster.stats.yaml index cb52e3b75..62e43b54f 100644 --- a/spec/schemas/cluster.stats.yaml +++ b/spec/schemas/cluster.stats.yaml @@ -213,10 +213,10 @@ components: description: Total number of fields in all non-system indices, accounting for mapping deduplication. type: number total_deduplicated_mapping_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' total_deduplicated_mapping_size_in_bytes: description: Total size of all mappings, in bytes, after deduplication and compression. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - field_types RuntimeFieldTypes: @@ -288,7 +288,7 @@ components: primary_shard_count: type: number total_primary_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' version: $ref: '_common.yaml#/components/schemas/VersionString' required: @@ -396,21 +396,37 @@ components: ClusterFileSystem: type: object properties: + available: + description: |- + Total number of bytes available to JVM in file stores across all selected nodes. + Depending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`. + This is the actual amount of free disk space the selected OpenSearch nodes can use. + $ref: '_common.yaml#/components/schemas/StorageSize' available_in_bytes: description: |- Total number of bytes available to JVM in file stores across all selected nodes. Depending on operating system or process-level restrictions, this number may be less than `nodes.fs.free_in_byes`. This is the actual amount of free disk space the selected OpenSearch nodes can use. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + free: + description: Total number of unallocated bytes in file stores across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' free_in_bytes: description: Total number of unallocated bytes in file stores across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + total: + description: Total size, of all file stores across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: description: Total size, in bytes, of all file stores across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + cache_reserved: + description: Total size, of all cache reserved across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' + x-version-added: '2.7' cache_reserved_in_bytes: description: Total size, in bytes, of all cache reserved across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' x-version-added: '2.7' required: - available_in_bytes @@ -429,7 +445,7 @@ components: current: $ref: '#/components/schemas/IndexingPressureMemorySummary' limit_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' total: $ref: '#/components/schemas/IndexingPressureMemorySummary' required: @@ -440,19 +456,19 @@ components: type: object properties: all_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' combined_coordinating_and_primary_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' coordinating_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' coordinating_rejections: type: number primary_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' primary_rejections: type: number replica_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' replica_rejections: type: number required: @@ -494,6 +510,8 @@ components: ClusterJvm: type: object properties: + max_uptime: + $ref: '_common.yaml#/components/schemas/Duration' max_uptime_in_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' mem: @@ -514,12 +532,18 @@ components: ClusterJvmMemory: type: object properties: + heap_max: + description: Maximum amount of memory available for use by the heap across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' heap_max_in_bytes: description: Maximum amount of memory, in bytes, available for use by the heap across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + heap_used: + description: Memory currently in use by the heap across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' heap_used_in_bytes: description: Memory, in bytes, currently in use by the heap across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - heap_max_in_bytes - heap_used_in_bytes @@ -621,19 +645,28 @@ components: properties: adjusted_total_in_bytes: description: Total amount, in bytes, of memory across all selected nodes, but using the value specified using the `es.total_memory_bytes` system property instead of measured total memory for those nodes where that system property was set. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + free: + description: Amount, in bytes, of free physical memory across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' free_in_bytes: description: Amount, in bytes, of free physical memory across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' free_percent: description: Percentage of free physical memory across all selected nodes. type: number + total: + description: Total amount of physical memory across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: description: Total amount, in bytes, of physical memory across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + used: + description: Amount of physical memory in use across all selected nodes. + $ref: '_common.yaml#/components/schemas/StorageSize' used_in_bytes: description: Amount, in bytes, of physical memory in use across all selected nodes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' used_percent: description: Percentage of physical memory in use across all selected nodes. type: number diff --git a/spec/schemas/indices._common.yaml b/spec/schemas/indices._common.yaml index fce77a57d..ea02f12f8 100644 --- a/spec/schemas/indices._common.yaml +++ b/spec/schemas/indices._common.yaml @@ -382,7 +382,7 @@ components: durability: $ref: '#/components/schemas/TranslogDurability' flush_threshold_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' retention: $ref: '#/components/schemas/TranslogRetention' TranslogDurability: @@ -394,7 +394,7 @@ components: type: object properties: size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' age: $ref: '_common.yaml#/components/schemas/Duration' SettingsQueryString: @@ -787,13 +787,13 @@ components: max_docs: type: number min_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' max_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' min_primary_shard_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' max_primary_shard_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' min_primary_shard_docs: type: number max_primary_shard_docs: diff --git a/spec/schemas/indices.data_streams_stats.yaml b/spec/schemas/indices.data_streams_stats.yaml index 9c1954f55..aec96d68b 100644 --- a/spec/schemas/indices.data_streams_stats.yaml +++ b/spec/schemas/indices.data_streams_stats.yaml @@ -17,10 +17,10 @@ components: maximum_timestamp: $ref: '_common.yaml#/components/schemas/EpochTimeUnitMillis' store_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' store_size_bytes: description: Total size, in bytes, of all shards for the data stream's backing indices. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - backing_indices - data_stream diff --git a/spec/schemas/indices.recovery.yaml b/spec/schemas/indices.recovery.yaml index b82d5b14c..c0d455478 100644 --- a/spec/schemas/indices.recovery.yaml +++ b/spec/schemas/indices.recovery.yaml @@ -95,21 +95,21 @@ components: percent: $ref: '_common.yaml#/components/schemas/Percentage' recovered: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' recovered_in_bytes: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/Bytes' recovered_from_snapshot: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' recovered_from_snapshot_in_bytes: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/Bytes' reused: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' reused_in_bytes: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/Bytes' total: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/Bytes' required: - percent - recovered_in_bytes diff --git a/spec/schemas/indices.rollover.yaml b/spec/schemas/indices.rollover.yaml index fb21a336c..05e73c318 100644 --- a/spec/schemas/indices.rollover.yaml +++ b/spec/schemas/indices.rollover.yaml @@ -20,21 +20,21 @@ components: max_docs: type: number max_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' max_size_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' min_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' min_size_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' max_primary_shard_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' max_primary_shard_size_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' min_primary_shard_size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' min_primary_shard_size_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' max_primary_shard_docs: type: number min_primary_shard_docs: diff --git a/spec/schemas/indices.segments.yaml b/spec/schemas/indices.segments.yaml index e964e9931..c049e3ef6 100644 --- a/spec/schemas/indices.segments.yaml +++ b/spec/schemas/indices.segments.yaml @@ -13,10 +13,10 @@ components: type: object additionalProperties: oneOf: - - $ref: '#/components/schemas/ShardsSegment' - type: array items: $ref: '#/components/schemas/ShardsSegment' + - $ref: '#/components/schemas/ShardsSegment' required: - shards ShardsSegment: @@ -53,26 +53,32 @@ components: Segment: type: object properties: - attributes: - type: object - additionalProperties: - type: string + generation: + type: integer + num_docs: + type: integer + deleted_docs: + type: integer + size: + $ref: '_common.yaml#/components/schemas/StorageSize' + size_in_bytes: + $ref: '_common.yaml#/components/schemas/Bytes' + memory: + $ref: '_common.yaml#/components/schemas/StorageSize' + memory_in_bytes: + $ref: '_common.yaml#/components/schemas/Bytes' committed: type: boolean - compound: - type: boolean - deleted_docs: - type: number - generation: - type: number search: type: boolean - size_in_bytes: - type: number - num_docs: - type: number version: $ref: '_common.yaml#/components/schemas/VersionString' + compound: + type: boolean + attributes: + type: object + additionalProperties: + type: string required: - attributes - committed diff --git a/spec/schemas/indices.stats.yaml b/spec/schemas/indices.stats.yaml index eb729afb7..6a12537b2 100644 --- a/spec/schemas/indices.stats.yaml +++ b/spec/schemas/indices.stats.yaml @@ -11,14 +11,16 @@ components: properties: description: type: string + size: + $ref: '_common.yaml#/components/schemas/StorageSize' size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' min_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' max_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' average_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' count: type: number required: @@ -203,4 +205,4 @@ components: required: - global_checkpoint - local_checkpoint - - max_seq_no \ No newline at end of file + - max_seq_no diff --git a/spec/schemas/nodes._common.yaml b/spec/schemas/nodes._common.yaml index cab8696c2..eb0c14f85 100644 --- a/spec/schemas/nodes._common.yaml +++ b/spec/schemas/nodes._common.yaml @@ -56,7 +56,7 @@ components: type: number request_size_bytes: description: Cumulative size in bytes of all requests from this client. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' x_opaque_id: description: |- Value from the client's `x-opaque-id` HTTP header. @@ -91,6 +91,8 @@ components: type: object additionalProperties: $ref: '#/components/schemas/KeyedProcessor' + time: + $ref: '_common.yaml#/components/schemas/Duration' time_in_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' KeyedProcessor: @@ -135,6 +137,11 @@ components: threads: description: Number of threads in the thread pool. type: number + total_wait_time: + description: | + The total amount of time that tasks spend waiting in the thread pool queue. + Currently, only `search`, `search_throttled`, and `index_searcher` thread pools support this metric. + $ref: '_common.yaml#/components/schemas/Duration' total_wait_time_in_nanos: description: | The total amount of time that tasks spend waiting in the thread pool queue. @@ -321,6 +328,8 @@ components: properties: count: type: number + time: + $ref: '_common.yaml#/components/schemas/Duration' time_in_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' current: @@ -378,8 +387,10 @@ components: ShardCacheStats: type: object properties: + size: + $ref: '_common.yaml#/components/schemas/StorageSize' size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' evictions: type: number hit_count: @@ -417,16 +428,16 @@ components: properties: estimated_size: description: Estimated memory used for the operation. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' estimated_size_in_bytes: description: Estimated memory used, in bytes, for the operation. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' limit_size: description: Memory limit for the circuit breaker. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' limit_size_in_bytes: description: Memory limit, in bytes, for the circuit breaker. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' overhead: description: A constant that all estimates for the circuit breaker are multiplied with to calculate a final estimate. type: number @@ -455,34 +466,38 @@ components: properties: available: description: Total amount of disk space available to this Java virtual machine on this file store. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' available_in_bytes: description: Total number of bytes available to this Java virtual machine on this file store. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + cache_reserved: + x-version-added: '2.7' + description: Total number of cache bytes reserved available to this Java virtual machine on this file store. + $ref: '_common.yaml#/components/schemas/StorageSize' cache_reserved_in_bytes: x-version-added: '2.7' description: Total number of cache bytes reserved available to this Java virtual machine on this file store. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' disk_queue: type: string disk_reads: type: number disk_read_size: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' disk_read_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' disk_writes: type: number disk_write_size: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' disk_write_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' free: description: Total amount of unallocated disk space in the file store. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' free_in_bytes: description: Total number of unallocated bytes in the file store. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' mount: description: 'Mount point of the file store (for example: `/dev/sda2`).' type: string @@ -491,10 +506,10 @@ components: type: string total: description: Total size of the file store. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: description: Total size of the file store in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' type: description: 'Type of the file store (ex: ext4).' type: string @@ -506,29 +521,33 @@ components: Total disk space available to this Java virtual machine on all file stores. Depending on OS or process level restrictions, this might appear less than `free`. This is the actual amount of free disk space the OpenSearch node can utilize. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' available_in_bytes: description: |- Total number of bytes available to this Java virtual machine on all file stores. Depending on OS or process level restrictions, this might appear less than `free_in_bytes`. This is the actual amount of free disk space the OpenSearch node can utilize. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' free: description: Total unallocated disk space in all file stores. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' free_in_bytes: description: Total number of unallocated bytes in all file stores. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' total: description: Total size of all file stores. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: description: Total size of all file stores in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + cache_reserved: + x-version-added: '2.7' + description: Total size of cache bytes reserved in all file stores. + $ref: '_common.yaml#/components/schemas/StorageSize' cache_reserved_in_bytes: x-version-added: '2.7' description: Total size of cache bytes reserved in all file stores. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' IoStats: type: object properties: @@ -605,16 +624,16 @@ components: type: number total_capacity: description: Total capacity of buffer pools. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' total_capacity_in_bytes: description: Total capacity of buffer pools in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' used: description: Size of buffer pools. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' used_in_bytes: description: Size of buffer pools in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' JvmClasses: type: object properties: @@ -650,24 +669,39 @@ components: JvmMemoryStats: type: object properties: + heap_used: + description: Memory currently in use by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' heap_used_in_bytes: description: Memory, in bytes, currently in use by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' heap_used_percent: description: Percentage of memory currently in use by the heap. type: number + heap_committed: + description: Amount of memory available for use by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' heap_committed_in_bytes: description: Amount of memory, in bytes, available for use by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + heap_max: + description: Maximum amount of memory available for use by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' heap_max_in_bytes: description: Maximum amount of memory, in bytes, available for use by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + non_heap_used: + description: Non-heap memory used. + $ref: '_common.yaml#/components/schemas/StorageSize' non_heap_used_in_bytes: description: Non-heap memory used, in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + non_heap_committed: + description: Amount of non-heap memory available. + $ref: '_common.yaml#/components/schemas/StorageSize' non_heap_committed_in_bytes: description: Amount of non-heap memory available, in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' pools: description: Contains statistics about heap memory usage for the node. type: object @@ -676,28 +710,44 @@ components: Pool: type: object properties: + used: + description: Memory used by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' used_in_bytes: description: Memory, in bytes, used by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + max: + description: Maximum amount of memory available for use by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' max_in_bytes: description: Maximum amount of memory, in bytes, available for use by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + peak_used: + description: Largest amount of memory historically used by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' peak_used_in_bytes: description: Largest amount of memory, in bytes, historically used by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + peak_max: + description: Largest amount of memory historically used by the heap. + $ref: '_common.yaml#/components/schemas/StorageSize' peak_max_in_bytes: description: Largest amount of memory, in bytes, historically used by the heap. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' last_gc_stats: description: Most recent GC cycle stats for a particular memory pool. $ref: '#/components/schemas/LastGcStats' LastGcStats: type: object properties: + used: + $ref: '_common.yaml#/components/schemas/StorageSize' used_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + max: + $ref: '_common.yaml#/components/schemas/StorageSize' max_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' usage_percent: type: number JvmThreads: @@ -761,28 +811,37 @@ components: description: |- If the amount of physical memory has been overridden using the `es`.`total_memory_bytes` system property then this reports the overridden value in bytes. Otherwise it reports the same value as `total_in_bytes`. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' resident: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' resident_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' share: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' share_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' total_virtual: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' total_virtual_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + total: + description: Total amount of physical memory. + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: description: Total amount of physical memory in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + free: + description: Amount of free physical memory. + $ref: '_common.yaml#/components/schemas/StorageSize' free_in_bytes: description: Amount of free physical memory in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + used: + description: Amount of used physical memory. + $ref: '_common.yaml#/components/schemas/StorageSize' used_in_bytes: description: Amount of used physical memory in bytes. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' Cgroup: type: object properties: @@ -892,10 +951,10 @@ components: type: number rx_size: description: Size of RX packets received by the node during internal cluster communication. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' rx_size_in_bytes: description: Size, in bytes, of RX packets received by the node during internal cluster communication. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' server_open: description: Current number of inbound TCP connections used for internal communication between nodes. type: number @@ -904,10 +963,10 @@ components: type: number tx_size: description: Size of TX packets sent by the node during internal cluster communication. - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' tx_size_in_bytes: description: Size, in bytes, of TX packets sent by the node during internal cluster communication. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' total_outbound_connections: description: |- The cumulative number of outbound transport connections that this node has opened since it started. @@ -1037,13 +1096,13 @@ components: count: type: number uncompressed_size: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' uncompressed_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' compressed_size: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' compressed_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' ClusterAppliedStats: type: object properties: @@ -1119,19 +1178,29 @@ components: properties: cancellation_count: type: number + current_max: + $ref: '_common.yaml#/components/schemas/StorageSize' current_max_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + current_avg: + $ref: '_common.yaml#/components/schemas/StorageSize' current_avg_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' + rolling_avg: + $ref: '_common.yaml#/components/schemas/StorageSize' rolling_avg_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats: type: object properties: cancellation_count: type: number + current_max: + $ref: '_common.yaml#/components/schemas/Duration' current_max_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' + current_avg: + $ref: '_common.yaml#/components/schemas/Duration' current_avg_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats: @@ -1139,8 +1208,12 @@ components: properties: cancellation_count: type: number + current_max: + $ref: '_common.yaml#/components/schemas/Duration' current_max_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' + current_avg: + $ref: '_common.yaml#/components/schemas/Duration' current_avg_millis: $ref: '_common.yaml#/components/schemas/DurationValueUnitMillis' ShardSearchBackpressureTaskCancellationStats: @@ -1167,12 +1240,12 @@ components: type: object properties: limit: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' limit_in_bytes: description: |- Configured memory limit, in bytes, for the indexing requests. Replica requests have an automatic limit that is 1.5x this value. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' current: $ref: '#/components/schemas/PressureMemory' total: @@ -1181,32 +1254,32 @@ components: type: object properties: all: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' all_in_bytes: description: Memory consumed, in bytes, by indexing requests in the coordinating, primary, or replica stage. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' combined_coordinating_and_primary: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' combined_coordinating_and_primary_in_bytes: description: |- Memory consumed, in bytes, by indexing requests in the coordinating or primary stage. This value is not the sum of coordinating and primary as a node can reuse the coordinating memory if the primary stage is executed locally. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' coordinating: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' coordinating_in_bytes: description: Memory consumed, in bytes, by indexing requests in the coordinating stage. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' primary: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' primary_in_bytes: description: Memory consumed, in bytes, by indexing requests in the primary stage. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' replica: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' replica_in_bytes: description: Memory consumed, in bytes, by indexing requests in the replica stage. - type: number + $ref: '_common.yaml#/components/schemas/Bytes' coordinating_rejections: description: Number of indexing requests rejected in the coordinating stage. type: number diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index 6fbcefdc2..7102b54b9 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -82,7 +82,7 @@ components: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. type: number total_indexing_buffer_in_bytes: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/Bytes' transport: $ref: '#/components/schemas/NodeInfoTransport' transport_address: @@ -115,9 +115,9 @@ components: items: type: string max_content_length: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' max_content_length_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' publish_address: type: string required: @@ -170,25 +170,25 @@ components: type: object properties: direct_max: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' direct_max_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' heap_init: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' heap_init_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' heap_max: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' heap_max_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' non_heap_init: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' non_heap_init_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' non_heap_max: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' non_heap_max_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - direct_max_in_bytes - heap_init_in_bytes @@ -251,9 +251,9 @@ components: type: object properties: cache_size: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' cache_size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' cores_per_socket: type: number mhz: @@ -279,9 +279,9 @@ components: type: object properties: total: - type: string + $ref: '_common.yaml#/components/schemas/StorageSize' total_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - total - total_in_bytes diff --git a/spec/schemas/snapshot._common.yaml b/spec/schemas/snapshot._common.yaml index 01433c0fd..f00611ec7 100644 --- a/spec/schemas/snapshot._common.yaml +++ b/spec/schemas/snapshot._common.yaml @@ -89,9 +89,9 @@ components: shard_count: type: number size: - $ref: '_common.yaml#/components/schemas/ByteSize' + $ref: '_common.yaml#/components/schemas/StorageSize' size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' max_segments_per_shard: type: number required: @@ -228,7 +228,7 @@ components: file_count: type: number size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - file_count - size_in_bytes @@ -278,7 +278,7 @@ components: file_count: type: number size_in_bytes: - type: number + $ref: '_common.yaml#/components/schemas/Bytes' required: - file_count - size_in_bytes diff --git a/tests/default/cat/shards.yaml b/tests/default/cat/shards.yaml index fa7d1d232..6e1749830 100644 --- a/tests/default/cat/shards.yaml +++ b/tests/default/cat/shards.yaml @@ -1,10 +1,11 @@ $schema: ../../../json_schemas/test_story.schema.yaml description: Test cat/shards endpoints. -epilogues: - - path: /games - method: DELETE - status: [200, 404] +prologues: + - path: /{index} + method: PUT + parameters: + index: games - path: /{index} method: PUT parameters: @@ -17,11 +18,10 @@ epilogues: allocation: require: test: test -prologues: - - path: /{index} - method: PUT - parameters: - index: games +epilogues: + - path: /games + method: DELETE + status: [200, 404] - path: /unassigned method: DELETE status: [200, 404] diff --git a/tests/default/cluster/allocation/explain.yaml b/tests/default/cluster/allocation/explain.yaml index 1525d2732..1ecd20f1c 100644 --- a/tests/default/cluster/allocation/explain.yaml +++ b/tests/default/cluster/allocation/explain.yaml @@ -22,6 +22,7 @@ chapters: parameters: include_yes_decisions: true include_disk_info: true + human: true request: payload: index: games diff --git a/tests/default/cluster/state.yaml b/tests/default/cluster/state.yaml index 56d5de917..cc044a8dc 100644 --- a/tests/default/cluster/state.yaml +++ b/tests/default/cluster/state.yaml @@ -5,6 +5,8 @@ chapters: - synopsis: Returns an internal representation of the cluster state. path: /_cluster/state method: GET + parameters: + human: true response: status: 200 - synopsis: Returns the cluster state version. diff --git a/tests/default/cluster/stats.yaml b/tests/default/cluster/stats.yaml index d6a8da584..cdf76bdd2 100644 --- a/tests/default/cluster/stats.yaml +++ b/tests/default/cluster/stats.yaml @@ -7,3 +7,10 @@ chapters: method: GET response: status: 200 + - synopsis: Returns statistics about a cluster with human parameters. + path: /_cluster/stats + method: GET + response: + status: 200 + parameters: + human: true diff --git a/tests/default/indices/cache.yaml b/tests/default/indices/cache.yaml index a079e25e5..f6f731719 100644 --- a/tests/default/indices/cache.yaml +++ b/tests/default/indices/cache.yaml @@ -23,7 +23,7 @@ chapters: method: POST parameters: allow_no_indices: true - expand_wildcards: none + expand_wildcards: all fielddata: true fields: '*' index: diff --git a/tests/default/indices/flush.yaml b/tests/default/indices/flush.yaml index c2afb3af4..8202a8f9a 100644 --- a/tests/default/indices/flush.yaml +++ b/tests/default/indices/flush.yaml @@ -13,8 +13,8 @@ chapters: path: /_flush method: GET parameters: - allow_no_indices: true - expand_wildcards: none + allow_no_indices: false + expand_wildcards: all force: true ignore_unavailable: true wait_if_ongoing: true diff --git a/tests/default/indices/forcemerge.yaml b/tests/default/indices/forcemerge.yaml index 8fb96e627..e6465d8ff 100644 --- a/tests/default/indices/forcemerge.yaml +++ b/tests/default/indices/forcemerge.yaml @@ -21,7 +21,7 @@ chapters: method: POST parameters: allow_no_indices: true - expand_wildcards: none + expand_wildcards: all flush: true max_num_segments: 1 only_expunge_deletes: true diff --git a/tests/default/indices/index.yaml b/tests/default/indices/index.yaml index 5446c4735..4b34c8937 100644 --- a/tests/default/indices/index.yaml +++ b/tests/default/indices/index.yaml @@ -40,7 +40,7 @@ chapters: parameters: index: books allow_no_indices: true - expand_wildcards: none + expand_wildcards: all flat_settings: true include_defaults: true ignore_unavailable: true diff --git a/tests/default/indices/mapping.yaml b/tests/default/indices/mapping.yaml index ac340f93e..635ffe5cc 100644 --- a/tests/default/indices/mapping.yaml +++ b/tests/default/indices/mapping.yaml @@ -64,7 +64,7 @@ chapters: parameters: index: movies allow_no_indices: true - expand_wildcards: none + expand_wildcards: all ignore_unavailable: true timeout: 10s write_index_only: true @@ -100,7 +100,7 @@ chapters: parameters: index: movies allow_no_indices: true - expand_wildcards: none + expand_wildcards: all ignore_unavailable: true timeout: 10s write_index_only: true @@ -117,7 +117,7 @@ chapters: parameters: index: movies allow_no_indices: true - expand_wildcards: none + expand_wildcards: all ignore_unavailable: true timeout: 10s write_index_only: true @@ -135,7 +135,7 @@ chapters: parameters: index: movies allow_no_indices: true - expand_wildcards: none + expand_wildcards: all ignore_unavailable: true timeout: 10s write_index_only: true diff --git a/tests/default/indices/resolve.yaml b/tests/default/indices/resolve.yaml index 7c0fb45ce..1e495be97 100644 --- a/tests/default/indices/resolve.yaml +++ b/tests/default/indices/resolve.yaml @@ -15,6 +15,6 @@ chapters: method: GET parameters: name: movies - expand_wildcards: none + expand_wildcards: all response: - status: 200 \ No newline at end of file + status: 200 diff --git a/tests/default/indices/segments.yaml b/tests/default/indices/segments.yaml index 0a481f578..43e5e19ec 100644 --- a/tests/default/indices/segments.yaml +++ b/tests/default/indices/segments.yaml @@ -17,7 +17,14 @@ chapters: path: /_segments method: GET parameters: - expand_wildcards: none + human: true + response: + status: 200 + - synopsis: Get details about Lucene segments with human fields. + path: /_segments + method: GET + parameters: + human: true response: status: 200 - synopsis: Get details about Lucene segments inside the specified index. diff --git a/tests/default/indices/settings.yaml b/tests/default/indices/settings.yaml index 4c9700c1d..c7349ede8 100644 --- a/tests/default/indices/settings.yaml +++ b/tests/default/indices/settings.yaml @@ -19,7 +19,7 @@ chapters: method: GET parameters: allow_no_indices: true - expand_wildcards: none + expand_wildcards: all flat_settings: true include_defaults: true ignore_unavailable: true @@ -36,7 +36,7 @@ chapters: version: '>= 2.0' parameters: allow_no_indices: true - expand_wildcards: none + expand_wildcards: all flat_settings: true include_defaults: true ignore_unavailable: true @@ -61,7 +61,7 @@ chapters: parameters: index: movies allow_no_indices: true - expand_wildcards: none + expand_wildcards: all response: status: 200 payload: diff --git a/tests/default/indices/stats.yaml b/tests/default/indices/stats.yaml index fa340ab79..24caa7e2f 100644 --- a/tests/default/indices/stats.yaml +++ b/tests/default/indices/stats.yaml @@ -10,10 +10,15 @@ epilogues: status: [200, 404] chapters: - synopsis: Get global stats. + path: /_stats + method: GET + response: + status: 200 + - synopsis: Get global stats with human fields. path: /_stats method: GET parameters: - expand_wildcards: none + human: true response: status: 200 - synopsis: Get stats for an index. @@ -21,7 +26,7 @@ chapters: method: GET parameters: index: movies - expand_wildcards: none + expand_wildcards: all fields: '*' completion_fields: '*' fielddata_fields: '*' diff --git a/tests/default/nodes/stats.yaml b/tests/default/nodes/stats.yaml index 7674f463f..aeddd5364 100644 --- a/tests/default/nodes/stats.yaml +++ b/tests/default/nodes/stats.yaml @@ -14,6 +14,7 @@ chapters: completion_fields: '*' fielddata_fields: '*' fields: '*' + human: true groups: - '*' timeout: 10s @@ -177,4 +178,4 @@ chapters: index_metric: - search response: - status: 200 \ No newline at end of file + status: 200 diff --git a/tests/routing/cluster/reroute.yaml b/tests/routing/cluster/reroute.yaml index a9b669a71..70128d791 100644 --- a/tests/routing/cluster/reroute.yaml +++ b/tests/routing/cluster/reroute.yaml @@ -52,4 +52,6 @@ chapters: from_node: opensearch-node1 to_node: opensearch-node2 response: - status: 200 \ No newline at end of file + status: 200 + payload: + acknowledged: true