Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds autoscaling and CCR API request and response examples #2788

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response of deleting one or more autoscaling policy.",
"description": "This may be a respons to either `DELETE /_autoscaling/policy/my_autoscaling_policy` or `DELETE /_autoscaling/policy/*`.",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\": true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving the current autoscaling capacity.",
"description": "This may be a response to `GET /_autoscaling/capacity`.",
"type": "response",
"response_code": 200,
"value": "{\n policies: {}\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving an autoscaling policy.",
"description": "This may be a response to `GET /_autoscaling/policy/my_autoscaling_policy`.",
"type": "response",
"response_code": 200,
"value": "{\n \"roles\": <roles>,\n \"deciders\": <deciders>\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Creates or updates an autoscaling policy.",
"method_request": "PUT /_autoscaling/policy/<name>",
"description": "",
"type": "request",
"value": "{\n \"roles\": [],\n \"deciders\": {\n \"fixed\": {\n }\n }\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Creates an autoscaling policy named `my_autoscaling_policy` using the fixed autoscaling decider, applying to the set of nodes having (only) the `data_hot` role",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"summary": "Creates an autoscaling policy named my_autoscaling_policy using the fixed autoscaling decider, applying to the set of nodes having (only) the data_hot role",

... not a blocker but I think the summary ought to be shorter and this longer detail could move to the description.

"method_request": "PUT /_autoscaling/policy/my_autoscaling_policy",
"description": "The API method and path for this request: `PUT /_autoscaling/policy/my_autoscaling_policy`",
"type": "request",
"value": "{\n \"roles\" : [ \"data_hot\" ],\n \"deciders\": {\n \"fixed\": {\n }\n }\n}"
}
szabosteve marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response when creating an autoscaling policy.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\": true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for deleting an auto-follow pattern.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Creates a follower index.",
"method_request": "PUT /<follower_index>/_ccr/follow?wait_for_active_shards=1",
"description": "The API method and path for this request: `PUT /<follower_index>/_ccr/follow?wait_for_active_shards=1`.",
"type": "request",
"value": "{\n \"remote_cluster\" : \"<remote_cluster>\",\n \"leader_index\" : \"<leader_index>\"\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Creates a follower index named `follower_index`.",
"method_request": "PUT /follower_index/_ccr/follow?wait_for_active_shards=1",
"description": "The API method and path for this reqest: `PUT /follower_index/_ccr/follow?wait_for_active_shards=1`.",
"type": "request",
"value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for creating a follower index.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"follow_index_created\" : true,\n \"follow_index_shards_acked\" : true,\n \"index_following_started\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving information about all follower indices",
"description": "This may be a response to `GET /follower_index/_ccr/info`.",
"type": "response",
"response_code": 200,
"value": "{\n \"follower_indices\": [\n {\n \"follower_index\": \"follower_index\",\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"status\": \"active\",\n \"parameters\": {\n \"max_read_request_operation_count\": 5120,\n \"max_read_request_size\": \"32mb\",\n \"max_outstanding_read_requests\": 12,\n \"max_write_request_operation_count\": 5120,\n \"max_write_request_size\": \"9223372036854775807b\",\n \"max_outstanding_write_requests\": 9,\n \"max_write_buffer_count\": 2147483647,\n \"max_write_buffer_size\": \"512mb\",\n \"max_retry_delay\": \"500ms\",\n \"read_poll_timeout\": \"1m\"\n }\n }\n ]\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving information about a paused follower index.",
"description": "",
"type": "response",
"response_code": "200",
"value": "{\n \"follower_indices\": [\n {\n \"follower_index\": \"follower_index\",\n \"remote_cluster\": \"remote_cluster\",\n \"leader_index\": \"leader_index\",\n \"status\": \"paused\"\n }\n ]\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving follower stats.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"total_global_checkpoint_lag\" : 256,\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Removes the follower retention leases from the leader index.",
"method_request": "POST /<leader_index>/_ccr/forget_follower",
"description": "The API method and path for this request: `POST /<leader_index>/_ccr/forget_follower`.",
"type": "request",
"value": "{\n \"follower_cluster\" : \"<follower_cluster>\",\n \"follower_index\" : \"<follower_index>\",\n \"follower_index_uuid\" : \"<follower_index_uuid>\",\n \"leader_remote_cluster\" : \"<leader_remote_cluster>\"\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for removing the follower retention leases from the leader index.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"_shards\" : {\n \"total\" : 1,\n \"successful\" : 1,\n \"failed\" : 0,\n \"failures\" : [ ]\n }\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving an auto-follow pattern.",
"description": "This may be a respons to `GET /_ccr/auto_follow/my_auto_follow_pattern`. ",
"type": "response",
"response_code": 200,
"value": "{\n \"patterns\": [\n {\n \"name\": \"my_auto_follow_pattern\",\n \"pattern\": {\n \"active\": true,\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"leader_index_exclusion_patterns\":\n [\n \"leader_index_001\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\"\n }\n }\n ]\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for pausing an auto-follow pattern.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for pausing a follower index.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Creates an auto-follow pattern.",
"method_request": "PUT /_ccr/auto_follow/<auto_follow_pattern_name>",
"description": "The API method and path for this request: `PUT /_ccr/auto_follow/<auto_follow_pattern_name>`",
"type": "request",
"value": "{\n \"remote_cluster\" : \"<remote_cluster>\",\n \"leader_index_patterns\" :\n [\n \"<leader_index_pattern>\"\n ],\n \"leader_index_exclusion_patterns\":\n [\n \"<leader_index_exclusion_pattern>\"\n ],\n \"follow_index_pattern\" : \"<follow_index_pattern>\"\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Creates an auto-follow pattern named `my_auto_follow_pattern`.",
"method_request": "PUT /_ccr/auto_follow/my_auto_follow_pattern",
"description": "The API method and path for this request: `PUT /_ccr/auto_follow/my_auto_follow_pattern`.",
"type": "request",
"value": "{\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index_patterns\" :\n [\n \"leader_index*\"\n ],\n \"follow_index_pattern\" : \"{{leader_index}}-follower\",\n \"settings\": {\n \"index.number_of_replicas\": 0\n },\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for creating an auto-follow pattern.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for resuming an auto-follow pattern.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "Resumes a follower index.",
"method_request": "POST /follower_index/_ccr/resume_follow",
"description": "The API method and path for this request: `POST /follower_index/_ccr/resume_follow`.",
"type": "request",
"value": "{\n \"max_read_request_operation_count\" : 1024,\n \"max_outstanding_read_requests\" : 16,\n \"max_read_request_size\" : \"1024k\",\n \"max_write_request_operation_count\" : 32768,\n \"max_write_request_size\" : \"16k\",\n \"max_outstanding_write_requests\" : 8,\n \"max_write_buffer_count\" : 512,\n \"max_write_buffer_size\" : \"512k\",\n \"max_retry_delay\" : \"10s\",\n \"read_poll_timeout\" : \"30s\"\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for resuming a folower index.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for retrieving cross-cluster replication stats.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"auto_follow_stats\" : {\n \"number_of_failed_follow_indices\" : 0,\n \"number_of_failed_remote_cluster_state_requests\" : 0,\n \"number_of_successful_follow_indices\" : 1,\n \"recent_auto_follow_errors\" : [],\n \"auto_followed_clusters\" : []\n },\n \"follow_stats\" : {\n \"indices\" : [\n {\n \"index\" : \"follower_index\",\n \"total_global_checkpoint_lag\" : 256,\n \"shards\" : [\n {\n \"remote_cluster\" : \"remote_cluster\",\n \"leader_index\" : \"leader_index\",\n \"follower_index\" : \"follower_index\",\n \"shard_id\" : 0,\n \"leader_global_checkpoint\" : 1024,\n \"leader_max_seq_no\" : 1536,\n \"follower_global_checkpoint\" : 768,\n \"follower_max_seq_no\" : 896,\n \"last_requested_seq_no\" : 897,\n \"outstanding_read_requests\" : 8,\n \"outstanding_write_requests\" : 2,\n \"write_buffer_operation_count\" : 64,\n \"follower_mapping_version\" : 4,\n \"follower_settings_version\" : 2,\n \"follower_aliases_version\" : 8,\n \"total_read_time_millis\" : 32768,\n \"total_read_remote_exec_time_millis\" : 16384,\n \"successful_read_requests\" : 32,\n \"failed_read_requests\" : 0,\n \"operations_read\" : 896,\n \"bytes_read\" : 32768,\n \"total_write_time_millis\" : 16384,\n \"write_buffer_size_in_bytes\" : 1536,\n \"successful_write_requests\" : 16,\n \"failed_write_requests\" : 0,\n \"operations_written\" : 832,\n \"read_exceptions\" : [ ],\n \"time_since_last_read_millis\" : 8\n }\n ]\n }\n ]\n }\n}"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"summary": "A successful response for converting a follower index to a regular index.",
"description": "",
"type": "response",
"response_code": 200,
"value": "{\n \"acknowledged\" : true\n}"
}