Skip to content

Commit

Permalink
revert 6855
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <[email protected]>
  • Loading branch information
Rishikesh1159 committed Mar 29, 2023
1 parent 2f1fdbd commit 027d8c7
Show file tree
Hide file tree
Showing 31 changed files with 74 additions and 777 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add 'base_path' setting to File System Repository ([#6558](https://github.com/opensearch-project/OpenSearch/pull/6558))
- Return success on DeletePits when no PITs exist. ([#6544](https://github.com/opensearch-project/OpenSearch/pull/6544))
- Add node repurpose command for search nodes ([#6517](https://github.com/opensearch-project/OpenSearch/pull/6517))
- Add wait_for_completion parameter to resize, open, and forcemerge APIs ([#6434](https://github.com/opensearch-project/OpenSearch/pull/6434))
- [Segment Replication] Apply backpressure when replicas fall behind ([#6563](https://github.com/opensearch-project/OpenSearch/pull/6563))
- [Remote Store] Integrate remote segment store in peer recovery flow ([#6664](https://github.com/opensearch-project/OpenSearch/pull/6664))
- [Segment Replication] Add new cluster setting to set replication strategy by default for all indices in cluster. ([#6791](https://github.com/opensearch-project/OpenSearch/pull/6791))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@
import org.opensearch.common.io.stream.NamedWriteableRegistry;
import org.opensearch.common.xcontent.XContentBuilder;
import org.opensearch.rest.BaseRestHandler;
import org.opensearch.rest.BytesRestResponse;
import org.opensearch.rest.RestRequest;
import org.opensearch.rest.RestStatus;
import org.opensearch.tasks.LoggingTaskListener;
import org.opensearch.tasks.Task;

import java.io.IOException;
import java.util.HashMap;
Expand Down Expand Up @@ -121,6 +124,17 @@ protected Request setCommonOptions(RestRequest restRequest, Request request) {
return request;
}

private RestChannelConsumer sendTask(String localNodeId, Task task) {
return channel -> {
try (XContentBuilder builder = channel.newBuilder()) {
builder.startObject();
builder.field("task", localNodeId + ":" + task.getId());
builder.endObject();
channel.sendResponse(new BytesRestResponse(RestStatus.OK, builder));
}
};
}

private static Integer parseSlices(RestRequest request) {
String slicesString = request.param("slices");
if (slicesString == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@
"wait_for_active_shards": {
"type" : "string",
"description" : "Set the number of active shards to wait for on the cloned index before the operation returns."
},
"wait_for_completion": {
"type" : "boolean",
"description" : "If false, the request will return a task immediately and the operation will run in background. Defaults to true."
},
"task_execution_timeout": {
"type" : "time",
"description" : "Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h."
}
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@
"only_expunge_deletes":{
"type":"boolean",
"description":"Specify whether the operation should only expunge deleted documents"
},
"wait_for_completion": {
"type" : "boolean",
"description" : "If false, the request will return a task immediately and the operation will run in background. Defaults to true."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,7 @@
},
"master_timeout":{
"type":"time",
"description":"Specify timeout for connection to master",
"deprecated":{
"version":"2.0.0",
"description":"To promote inclusive language, use 'cluster_manager_timeout' instead."
}
},
"cluster_manager_timeout":{
"type":"time",
"description":"Specify timeout for connection to cluster-manager node"
"description":"Specify timeout for connection to master"
},
"ignore_unavailable":{
"type":"boolean",
Expand All @@ -61,14 +53,6 @@
"wait_for_active_shards":{
"type":"string",
"description":"Sets the number of active shards to wait for before the operation returns."
},
"wait_for_completion": {
"type" : "boolean",
"description" : "If false, the request will return a task immediately and the operation will run in background. Defaults to true."
},
"task_execution_timeout": {
"type" : "time",
"description" : "Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@
"wait_for_active_shards": {
"type" : "string",
"description" : "Set the number of active shards to wait for on the shrunken index before the operation returns."
},
"wait_for_completion": {
"type" : "boolean",
"description" : "If false, the request will return a task immediately and the operation will run in background. Defaults to true."
},
"task_execution_timeout": {
"type" : "time",
"description" : "Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h."
}
},
"body":{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@
"wait_for_active_shards": {
"type" : "string",
"description" : "Set the number of active shards to wait for on the shrunken index before the operation returns."
},
"wait_for_completion": {
"type" : "boolean",
"description" : "If false, the request will return a task immediately and the operation will run in background. Defaults to true."
},
"task_execution_timeout": {
"type" : "time",
"description" : "Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h."
}
},
"body":{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 027d8c7

Please sign in to comment.