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

Merge to pit feature branch #3708

Merged
merged 83 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
fb26e17
Bump reactor-netty-core from 1.0.16 to 1.0.19 in /plugins/repository-…
dependabot[bot] May 18, 2022
a76b04d
[Type removal] _type removal from mocked responses of scroll hit test…
dreamer-89 May 18, 2022
daed5c1
[Type removal] Remove _type deprecation from script and conditional p…
dreamer-89 May 18, 2022
7a73fb5
[Type removal] Remove _type from _bulk yaml test, scripts, unused con…
dreamer-89 May 18, 2022
7046008
Fix Lucene-snapshots repo for jdk 17. (#3396)
mch2 May 19, 2022
507f8cc
Replace internal usages of 'master' term in 'server/src/internalClust…
May 19, 2022
96b45ca
[REMOVE] Cleanup deprecated thread pool types (FIXED_AUTO_QUEUE_SIZE)…
reta May 19, 2022
6699624
[Type removal] _type removal from tests of yaml tests (#3406)
dreamer-89 May 20, 2022
acf7da7
Add release notes for version 2.0.0 (#3410)
adnapibar May 20, 2022
5358502
[Upgrade] Lucene-9.2.0-snapshot-ba8c3a8 (#3416)
nknize May 20, 2022
4a87906
Fix release notes for 2.0.0-rc1 version (#3418)
adnapibar May 20, 2022
cb6148e
Bump version 2.1 to Lucene 9.2 after upgrade (#3424)
nknize May 23, 2022
e19ed09
Bump com.gradle.enterprise from 3.10 to 3.10.1 (#3425)
dependabot[bot] May 23, 2022
53960cf
Bump reactor-core from 3.4.17 to 3.4.18 in /plugins/repository-azure …
dependabot[bot] May 23, 2022
55ca331
Bump gax-httpjson from 0.101.0 to 0.103.1 in /plugins/repository-gcs …
dependabot[bot] May 23, 2022
a023ad9
[segment replication]Introducing common Replication interfaces for se…
Poojita-Raj May 23, 2022
eb847ae
[Type removal] Remove type from BulkRequestParser (#3423)
dreamer-89 May 23, 2022
fd5a38d
Adding CheckpointRefreshListener to trigger when Segment replication …
Rishikesh1159 May 24, 2022
a0030df
Add a new Engine implementation for replicas with segment replication…
mch2 May 24, 2022
0b77055
Rename master to cluster_manager in the XContent Parser of ClusterHea…
May 25, 2022
ff75307
Bump hadoop-minicluster in /test/fixtures/hdfs-fixture (#3359)
dependabot[bot] May 25, 2022
5320b68
Bump avro from 1.10.2 to 1.11.0 in /plugins/repository-hdfs (#3358)
dependabot[bot] May 25, 2022
5099780
Fix testSetAdditionalRolesCanAddDeprecatedMasterRole() by removing th…
May 25, 2022
296fa09
Replace internal usages of 'master' term in 'server/src/test' directo…
May 25, 2022
1e6dd56
Removing unused method from TransportSearchAction (#3437)
jainankitk May 26, 2022
e647525
Set term vector flags to false for ._index_prefix field (#1901). (#3119)
vpehkone May 26, 2022
1b93cf8
[BUG] Fixing org.opensearch.monitor.os.OsProbeTests > testLogWarnCpuM…
reta May 27, 2022
e9b19a0
[Segment Replication] Add SegmentReplicationTargetService to orchestr…
mch2 May 27, 2022
d0a16d3
Bump azure-core-http-netty from 1.11.9 to 1.12.0 in /plugins/reposito…
dependabot[bot] May 30, 2022
1ebd509
Update to Apache Lucene 9.2 (#3477)
reta May 30, 2022
8723014
Bump protobuf-java from 3.20.1 to 3.21.1 in /plugins/repository-hdfs …
dependabot[bot] May 31, 2022
1ceff28
[Upgrade] Lucene-9.3.0-snapshot-823df23 (#3478)
nknize May 31, 2022
2bfe8b3
Filter out invalid URI and HTTP method in the error message of no han…
Jun 2, 2022
596d32a
Support use of IRSA for repository-s3 plugin credentials (#3475)
reta Jun 2, 2022
0add9d2
Bump google-auth-library-oauth2-http from 0.20.0 to 1.7.0 in /plugins…
dependabot[bot] Jun 2, 2022
b902add
[Segment Replication] Added source-side classes for orchestrating rep…
kartg Jun 3, 2022
feaa747
[Dependency upgrade] google-oauth-client to 1.33.3 (#3500)
dreamer-89 Jun 3, 2022
2fbf335
move bash flag to set statement (#3494)
shdubsh Jun 3, 2022
6c769d4
Support use of IRSA for repository-s3 plugin credentials: added YAML …
reta Jun 6, 2022
e97a3dd
Bump azure-storage-common from 12.15.0 to 12.16.0 in /plugins/reposit…
dependabot[bot] Jun 6, 2022
37b48ef
Bump google-oauth-client from 1.33.3 to 1.34.0 in /plugins/discovery-…
dependabot[bot] Jun 6, 2022
ab478ba
Fix the support of RestClient Node Sniffer for version 2.x and update…
Jun 6, 2022
1676628
Bump com.diffplug.spotless from 6.6.1 to 6.7.0 (#3513)
dependabot[bot] Jun 7, 2022
811a580
Bump guava from 18.0 to 23.0 in /plugins/ingest-attachment (#3357)
dependabot[bot] Jun 8, 2022
81a77aa
Added bwc version 2.0.1 (#3452)
opensearch-trigger-bot[bot] Jun 8, 2022
60c8ca9
Add release notes for 1.3.3 (#3549)
xuezhou25 Jun 9, 2022
fc54154
[Upgrade] Lucene-9.3.0-snapshot-b7231bb (#3537)
nknize Jun 9, 2022
fb13759
[Remote Store] Upload segments to remote store post refresh (#3460)
sachinpkale Jun 10, 2022
92b3cbb
Fixing VerifyVersionConstantsIT test failure (#3574)
reta Jun 13, 2022
a543224
Bump jettison from 1.4.1 to 1.5.0 in /plugins/discovery-azure-classic…
dependabot[bot] Jun 14, 2022
e5ad240
Bump google-api-services-storage from v1-rev20200814-1.30.10 to v1-re…
dependabot[bot] Jun 14, 2022
836a9c4
Add flat_skew setting to node overload decider (#3563)
imRishN Jun 14, 2022
688c348
Bump xmlbeans from 5.0.3 to 5.1.0 in /plugins/ingest-attachment (#3572)
dependabot[bot] Jun 14, 2022
cce0781
Bump google-oauth-client from 1.34.0 to 1.34.1 in /plugins/discovery-…
dependabot[bot] Jun 14, 2022
2f9f8e1
Fix for bug showing incorrect awareness attributes count in Awareness…
anshu1106 Jun 14, 2022
c764d63
Added bwc version 1.3.4 (#3552)
opensearch-trigger-bot[bot] Jun 14, 2022
e9c5ce3
Support dynamic node role (#3436)
ylwu-amzn Jun 14, 2022
e767924
Rename package 'o.o.action.support.master' to 'o.o.action.support.clu…
Jun 15, 2022
055a9fc
Fixing flakiness of ShuffleForcedMergePolicyTests (#3591)
reta Jun 15, 2022
223d472
Deprecate classes in org.opensearch.action.support.master (#3593)
Jun 15, 2022
8844f05
Add release notes for version 2.0.1 (#3595)
kotwanikunal Jun 15, 2022
34797c6
Fix NPE when minBound/maxBound is not set before being called. (#3605)
GeorgeAp Jun 16, 2022
086c6e8
Added bwc version 2.0.2 (#3613)
opensearch-trigger-bot[bot] Jun 16, 2022
b5f137b
Fix false positive query timeouts due to using cached time (#3454)
aabukhalil Jun 17, 2022
0b84016
Fix random gradle check failure issue 3584. (#3627)
mch2 Jun 17, 2022
04e43a7
[Segment Replication] Add components for segment replication to perfo…
mch2 Jun 20, 2022
60d7a09
Deprecate public methods and variables with master term in package 'o…
Jun 22, 2022
3d4d5ca
Add replication orchestration for a single shard (#3533)
Poojita-Raj Jun 22, 2022
3dba46e
[BUG] opensearch crashes on closed client connection before search re…
reta Jun 22, 2022
621cee9
Add all deprecated method in the package with new name 'org.opensearc…
Jun 22, 2022
078f90c
Introduce TranslogManager implementations decoupled from the Engine (…
Bukhtawar Jun 22, 2022
7005b9e
Adding onNewCheckpoint to Start Replication on Replica Shard when Seg…
Rishikesh1159 Jun 22, 2022
a89ed24
Remove class org.opensearch.action.support.master.AcknowledgedRespons…
Jun 23, 2022
4d045a1
Restore AcknowledgedResponse and AcknowledgedRequest to package org.o…
Jun 23, 2022
304d830
[BUG] Custom POM configuration for ZIP publication produces duplicit …
reta Jun 23, 2022
d6ea1aa
Adding 2.2.0 Bwc version to main (#3673)
saratvemulapalli Jun 24, 2022
6071824
Upgraded to t-digest 3.3. (#3634)
dblock Jun 24, 2022
722a8b9
Revert renaming method onMaster() and offMaster() in interface LocalN…
Jun 24, 2022
aa6f782
Upgrading AWS SDK dependency for native plugins (#3694)
saratvemulapalli Jun 25, 2022
6016689
Merge branch 'feature/point_in_time' of https://github.com/opensearch…
bharath-techie Jun 27, 2022
c48a216
Merge branch 'feature/point_in_time' of https://github.com/opensearch…
bharath-techie Jun 27, 2022
8de0fac
Merge branch 'feature/point_in_time' of https://github.com/opensearch…
bharath-techie Jun 27, 2022
9b12d89
Merge branch 'fb' of github.com:bharath-techie/OpenSearch into fb
bharath-techie Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ BWC_VERSION:
- "2.0.1"
- "2.0.2"
- "2.1.0"
- "2.2.0"
50 changes: 47 additions & 3 deletions buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension;
import groovy.util.Node;
import groovy.util.NodeList;

import org.opensearch.gradle.info.BuildParams;
import org.opensearch.gradle.precommit.PomValidationPrecommitPlugin;
import org.opensearch.gradle.util.Util;
Expand All @@ -55,6 +56,9 @@
import org.gradle.api.tasks.bundling.Jar;
import org.gradle.language.base.plugins.LifecycleBasePlugin;

import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.util.concurrent.Callable;

import static org.opensearch.gradle.util.GradleUtils.maybeConfigure;
Expand Down Expand Up @@ -146,9 +150,49 @@ public String call() throws Exception {

private static void addScmInfo(XmlProvider xml) {
Node root = xml.asNode();
root.appendNode("url", Util.urlFromOrigin(BuildParams.getGitOrigin()));
Node scmNode = root.appendNode("scm");
scmNode.appendNode("url", BuildParams.getGitOrigin());
Node url = null, scm = null;

for (final Object child : root.children()) {
if (child instanceof Node) {
final Node node = (Node) child;
final Object name = node.name();

try {
// For Gradle 6.8 and below, the class is groovy.xml.QName
// For Gradle 7.4 and above, the class is groovy.namespace.QName
if (name != null && name.getClass().getSimpleName().equals("QName")) {
final MethodHandle handle = MethodHandles.publicLookup()
.findVirtual(name.getClass(), "matches", MethodType.methodType(boolean.class, Object.class))
.bindTo(name);

if ((boolean) handle.invoke("url")) {
url = node;
} else if ((boolean) handle.invoke("scm")) {
scm = node;
}
}
} catch (final Throwable ex) {
// Not a suitable QName type we could use ...
}

if ("url".equals(name)) {
url = node;
} else if ("scm".equals(name)) {
scm = node;
}
}
}

// Only include URL section if it is not provided in the POM already
if (url == null) {
root.appendNode("url", Util.urlFromOrigin(BuildParams.getGitOrigin()));
}

// Only include SCM section if it is not provided in the POM already
if (scm == null) {
Node scmNode = root.appendNode("scm");
scmNode.appendNode("url", BuildParams.getGitOrigin());
}
}

/** Adds a javadocJar task to generate a jar containing javadocs. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,62 @@ public void tearDown() {

@Test
public void testZipPublish() throws IOException, XmlPullParserException {
Project project = ProjectBuilder.builder().build();
String zipPublishTask = "publishPluginZipPublicationToZipStagingRepository";
// Apply the opensearch.pluginzip plugin
project.getPluginManager().apply("opensearch.pluginzip");
// Check if the plugin has been applied to the project
assertTrue(project.getPluginManager().hasPlugin("opensearch.pluginzip"));
// Check if the project has the task from class PublishToMavenRepository after plugin apply
assertNotNull(project.getTasks().withType(PublishToMavenRepository.class));
// Create a mock bundlePlugin task
Zip task = project.getTasks().create("bundlePlugin", Zip.class);
Publish.configMaven(project);
// Check if the main task publishPluginZipPublicationToZipStagingRepository exists after plugin apply
assertTrue(project.getTasks().getNames().contains(zipPublishTask));
assertNotNull("Task to generate: ", project.getTasks().getByName(zipPublishTask));
// Run Gradle functional tests, but calling a build.gradle file, that resembles the plugin publish behavior
prepareProjectForPublishTask(zipPublishTask);

// Generate the build.gradle file
String buildFileContent = "apply plugin: 'maven-publish' \n"
+ "apply plugin: 'java' \n"
+ "publishing {\n"
+ " repositories {\n"
+ " maven {\n"
+ " url = 'local-staging-repo/'\n"
+ " name = 'zipStaging'\n"
+ " }\n"
+ " }\n"
+ " publications {\n"
+ " pluginZip(MavenPublication) {\n"
+ " groupId = 'org.opensearch.plugin' \n"
+ " artifactId = 'sample-plugin' \n"
+ " version = '2.0.0.0' \n"
+ " artifact('sample-plugin.zip') \n"
+ " }\n"
+ " }\n"
+ "}";
writeString(projectDir.newFile("build.gradle"), buildFileContent);
// Execute the task publishPluginZipPublicationToZipStagingRepository
List<String> allArguments = new ArrayList<String>();
allArguments.add("build");
allArguments.add(zipPublishTask);
GradleRunner runner = GradleRunner.create();
runner.forwardOutput();
runner.withPluginClasspath();
runner.withArguments(allArguments);
runner.withProjectDir(projectDir.getRoot());
BuildResult result = runner.build();
// Check if task publishMavenzipPublicationToZipstagingRepository has ran well
assertEquals(SUCCESS, result.task(":" + zipPublishTask).getOutcome());
// check if the zip has been published to local staging repo
assertTrue(
new File(projectDir.getRoot(), "local-staging-repo/org/opensearch/plugin/sample-plugin/2.0.0.0/sample-plugin-2.0.0.0.zip")
.exists()
);
assertEquals(SUCCESS, result.task(":" + "build").getOutcome());
// Parse the maven file and validate the groupID to org.opensearch.plugin
MavenXpp3Reader reader = new MavenXpp3Reader();
Model model = reader.read(
new FileReader(
new File(projectDir.getRoot(), "local-staging-repo/org/opensearch/plugin/sample-plugin/2.0.0.0/sample-plugin-2.0.0.0.pom")
)
);
assertEquals(model.getGroupId(), "org.opensearch.plugin");
}

@Test
public void testZipPublishWithPom() throws IOException, XmlPullParserException {
String zipPublishTask = "publishPluginZipPublicationToZipStagingRepository";
Project project = prepareProjectForPublishTask(zipPublishTask);

// Create a sample plugin zip file
File sampleZip = new File(projectDir.getRoot(), "sample-plugin.zip");
Files.createFile(sampleZip.toPath());
writeString(projectDir.newFile("settings.gradle"), "");
// Generate the build.gradle file
String buildFileContent = "apply plugin: 'maven-publish' \n"
+ "apply plugin: 'java' \n"
Expand All @@ -88,6 +124,26 @@ public void testZipPublish() throws IOException, XmlPullParserException {
+ " artifactId = 'sample-plugin' \n"
+ " version = '2.0.0.0' \n"
+ " artifact('sample-plugin.zip') \n"
+ " pom {\n"
+ " name = 'sample-plugin'\n"
+ " description = 'sample-description'\n"
+ " licenses {\n"
+ " license {\n"
+ " name = \"The Apache License, Version 2.0\"\n"
+ " url = \"http://www.apache.org/licenses/LICENSE-2.0.txt\"\n"
+ " }\n"
+ " }\n"
+ " developers {\n"
+ " developer {\n"
+ " name = 'opensearch'\n"
+ " url = 'https://github.com/opensearch-project/OpenSearch'\n"
+ " }\n"
+ " }\n"
+ " url = 'https://github.com/opensearch-project/OpenSearch'\n"
+ " scm {\n"
+ " url = 'https://github.com/opensearch-project/OpenSearch'\n"
+ " }\n"
+ " }"
+ " }\n"
+ " }\n"
+ "}";
Expand Down Expand Up @@ -118,6 +174,32 @@ public void testZipPublish() throws IOException, XmlPullParserException {
)
);
assertEquals(model.getGroupId(), "org.opensearch.plugin");
assertEquals(model.getUrl(), "https://github.com/opensearch-project/OpenSearch");
}

protected Project prepareProjectForPublishTask(String zipPublishTask) throws IOException {
Project project = ProjectBuilder.builder().build();

// Apply the opensearch.pluginzip plugin
project.getPluginManager().apply("opensearch.pluginzip");
// Check if the plugin has been applied to the project
assertTrue(project.getPluginManager().hasPlugin("opensearch.pluginzip"));
// Check if the project has the task from class PublishToMavenRepository after plugin apply
assertNotNull(project.getTasks().withType(PublishToMavenRepository.class));
// Create a mock bundlePlugin task
Zip task = project.getTasks().create("bundlePlugin", Zip.class);
Publish.configMaven(project);
// Check if the main task publishPluginZipPublicationToZipStagingRepository exists after plugin apply
assertTrue(project.getTasks().getNames().contains(zipPublishTask));
assertNotNull("Task to generate: ", project.getTasks().getByName(zipPublishTask));
// Run Gradle functional tests, but calling a build.gradle file, that resembles the plugin publish behavior

// Create a sample plugin zip file
File sampleZip = new File(projectDir.getRoot(), "sample-plugin.zip");
Files.createFile(sampleZip.toPath());
writeString(projectDir.newFile("settings.gradle"), "");

return project;
}

private void writeString(File file, String string) throws IOException {
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ httpasyncclient = 4.1.4
commonslogging = 1.2
commonscodec = 1.13

# plugin dependencies
aws = 1.12.247

# when updating this version, you need to ensure compatibility with:
# - plugins/ingest-attachment (transitive dependency, check the upstream POM)
# - distribution/tools/plugin-cli
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.opensearch.action.admin.cluster.settings.ClusterGetSettingsResponse;
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsResponse;
import org.opensearch.action.support.clustermanager.AcknowledgedResponse;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.opensearch.client.cluster.RemoteInfoRequest;
import org.opensearch.client.cluster.RemoteInfoResponse;
import org.opensearch.client.indices.ComponentTemplatesExistRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static Request clusterPutSettings(ClusterUpdateSettingsRequest clusterUpdateSett

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(clusterUpdateSettingsRequest.timeout());
parameters.withClusterManagerTimeout(clusterUpdateSettingsRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(clusterUpdateSettingsRequest.clusterManagerNodeTimeout());
request.addParameters(parameters.asMap());
request.setEntity(RequestConverters.createEntity(clusterUpdateSettingsRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
return request;
Expand All @@ -69,7 +69,7 @@ static Request clusterGetSettings(ClusterGetSettingsRequest clusterGetSettingsRe
RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withLocal(clusterGetSettingsRequest.local());
parameters.withIncludeDefaults(clusterGetSettingsRequest.includeDefaults());
parameters.withClusterManagerTimeout(clusterGetSettingsRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(clusterGetSettingsRequest.clusterManagerNodeTimeout());
request.addParameters(parameters.asMap());
return request;
}
Expand All @@ -88,7 +88,7 @@ static Request clusterHealth(ClusterHealthRequest healthRequest) {
.withWaitForNodes(healthRequest.waitForNodes())
.withWaitForEvents(healthRequest.waitForEvents())
.withTimeout(healthRequest.timeout())
.withClusterManagerTimeout(healthRequest.masterNodeTimeout())
.withClusterManagerTimeout(healthRequest.clusterManagerNodeTimeout())
.withLocal(healthRequest.local())
.withLevel(healthRequest.level());
request.addParameters(params.asMap());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
import org.opensearch.action.admin.indices.template.delete.DeleteIndexTemplateRequest;
import org.opensearch.action.admin.indices.validate.query.ValidateQueryRequest;
import org.opensearch.action.admin.indices.validate.query.ValidateQueryResponse;
import org.opensearch.action.support.clustermanager.AcknowledgedResponse;
import org.opensearch.action.support.master.AcknowledgedResponse;
import org.opensearch.client.indices.AnalyzeRequest;
import org.opensearch.client.indices.AnalyzeResponse;
import org.opensearch.client.indices.CloseIndexRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static Request deleteIndex(DeleteIndexRequest deleteIndexRequest) {

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(deleteIndexRequest.timeout());
parameters.withClusterManagerTimeout(deleteIndexRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(deleteIndexRequest.clusterManagerNodeTimeout());
parameters.withIndicesOptions(deleteIndexRequest.indicesOptions());
request.addParameters(parameters.asMap());
return request;
Expand All @@ -131,7 +131,7 @@ static Request openIndex(OpenIndexRequest openIndexRequest) {

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(openIndexRequest.timeout());
parameters.withClusterManagerTimeout(openIndexRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(openIndexRequest.clusterManagerNodeTimeout());
parameters.withWaitForActiveShards(openIndexRequest.waitForActiveShards());
parameters.withIndicesOptions(openIndexRequest.indicesOptions());
request.addParameters(parameters.asMap());
Expand Down Expand Up @@ -168,7 +168,7 @@ static Request updateAliases(IndicesAliasesRequest indicesAliasesRequest) throws

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(indicesAliasesRequest.timeout());
parameters.withClusterManagerTimeout(indicesAliasesRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(indicesAliasesRequest.clusterManagerNodeTimeout());
request.addParameters(parameters.asMap());
request.setEntity(RequestConverters.createEntity(indicesAliasesRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
return request;
Expand Down Expand Up @@ -349,7 +349,7 @@ private static Request resize(org.opensearch.action.admin.indices.shrink.ResizeR

RequestConverters.Params params = new RequestConverters.Params();
params.withTimeout(resizeRequest.timeout());
params.withClusterManagerTimeout(resizeRequest.masterNodeTimeout());
params.withClusterManagerTimeout(resizeRequest.clusterManagerNodeTimeout());
params.withWaitForActiveShards(resizeRequest.getTargetIndexRequest().waitForActiveShards());
request.addParameters(params.asMap());
request.setEntity(RequestConverters.createEntity(resizeRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
Expand Down Expand Up @@ -386,7 +386,7 @@ static Request getSettings(GetSettingsRequest getSettingsRequest) {
params.withIndicesOptions(getSettingsRequest.indicesOptions());
params.withLocal(getSettingsRequest.local());
params.withIncludeDefaults(getSettingsRequest.includeDefaults());
params.withClusterManagerTimeout(getSettingsRequest.masterNodeTimeout());
params.withClusterManagerTimeout(getSettingsRequest.clusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand Down Expand Up @@ -429,7 +429,7 @@ static Request indexPutSettings(UpdateSettingsRequest updateSettingsRequest) thr

RequestConverters.Params parameters = new RequestConverters.Params();
parameters.withTimeout(updateSettingsRequest.timeout());
parameters.withClusterManagerTimeout(updateSettingsRequest.masterNodeTimeout());
parameters.withClusterManagerTimeout(updateSettingsRequest.clusterManagerNodeTimeout());
parameters.withIndicesOptions(updateSettingsRequest.indicesOptions());
parameters.withPreserveExisting(updateSettingsRequest.isPreserveExisting());
request.addParameters(parameters.asMap());
Expand All @@ -443,7 +443,7 @@ static Request putTemplate(PutIndexTemplateRequest putIndexTemplateRequest) thro
.build();
Request request = new Request(HttpPut.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(putIndexTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(putIndexTemplateRequest.clusterManagerNodeTimeout());
if (putIndexTemplateRequest.create()) {
params.putParam("create", Boolean.TRUE.toString());
}
Expand Down Expand Up @@ -587,7 +587,7 @@ static Request deleteTemplate(DeleteIndexTemplateRequest deleteIndexTemplateRequ
String endpoint = new RequestConverters.EndpointBuilder().addPathPartAsIs("_template").addPathPart(name).build();
Request request = new Request(HttpDelete.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params();
params.withClusterManagerTimeout(deleteIndexTemplateRequest.masterNodeTimeout());
params.withClusterManagerTimeout(deleteIndexTemplateRequest.clusterManagerNodeTimeout());
request.addParameters(params.asMap());
return request;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.opensearch.action.ingest.PutPipelineRequest;
import org.opensearch.action.ingest.SimulatePipelineRequest;
import org.opensearch.action.ingest.SimulatePipelineResponse;
import org.opensearch.action.support.clustermanager.AcknowledgedResponse;
import org.opensearch.action.support.master.AcknowledgedResponse;

import java.io.IOException;
import java.util.Collections;
Expand Down
Loading