From 16a30ba8bc07ffbc8a497b383c9acb7e6daf2432 Mon Sep 17 00:00:00 2001 From: Tianli Feng Date: Sun, 15 May 2022 15:13:36 -0700 Subject: [PATCH] Replace 'master' terminology with 'cluster manager' in modules directory Signed-off-by: Tianli Feng --- .../rest-api-spec/test/stats/10_basic.yml | 2 +- .../test/analysis-common/10_basic.yml | 2 +- .../rest-api-spec/test/ingest/10_basic.yml | 2 +- .../rest-api-spec/test/ingest/70_bulk.yml | 4 ++-- .../ingest/geoip/DatabaseReaderLazyLoader.java | 2 +- .../test/lang_expression/10_basic.yml | 2 +- .../test/lang_mustache/10_basic.yml | 2 +- .../rest-api-spec/test/painless/10_basic.yml | 2 +- .../index/mapper/metricbeat-6.0.template.json | 4 ++-- .../join/aggregations/ChildrenIT.java | 10 ++++------ .../opensearch/index/reindex/RetryTests.java | 14 +++++++------- .../rest-api-spec/test/reindex/90_remote.yml | 18 +++++++++--------- .../test/reindex/95_parent_join.yml | 2 +- .../test/repository_url/10_basic.yml | 2 +- .../resources/rest-api-spec/test/10_basic.yml | 2 +- 15 files changed, 34 insertions(+), 36 deletions(-) diff --git a/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/10_basic.yml b/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/10_basic.yml index 2416d2b2b3141..837a38d2ccda3 100644 --- a/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/10_basic.yml +++ b/modules/aggs-matrix-stats/src/yamlRestTest/resources/rest-api-spec/test/stats/10_basic.yml @@ -7,7 +7,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/10_basic.yml b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/10_basic.yml index ca6cd2e953be4..99d1b03d795f4 100644 --- a/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/10_basic.yml +++ b/modules/analysis-common/src/yamlRestTest/resources/rest-api-spec/test/analysis-common/10_basic.yml @@ -5,7 +5,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/10_basic.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/10_basic.yml index 8a803eae1fc3d..39a649166ad74 100644 --- a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/10_basic.yml +++ b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/10_basic.yml @@ -5,7 +5,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/70_bulk.yml b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/70_bulk.yml index 5b442456e64d0..46a5b71e9c359 100644 --- a/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/70_bulk.yml +++ b/modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/70_bulk.yml @@ -77,7 +77,7 @@ teardown: - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: @@ -113,7 +113,7 @@ teardown: - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/ingest-geoip/src/main/java/org/opensearch/ingest/geoip/DatabaseReaderLazyLoader.java b/modules/ingest-geoip/src/main/java/org/opensearch/ingest/geoip/DatabaseReaderLazyLoader.java index 1cafae0e50cef..70feb44f0f385 100644 --- a/modules/ingest-geoip/src/main/java/org/opensearch/ingest/geoip/DatabaseReaderLazyLoader.java +++ b/modules/ingest-geoip/src/main/java/org/opensearch/ingest/geoip/DatabaseReaderLazyLoader.java @@ -71,7 +71,7 @@ class DatabaseReaderLazyLoader implements Closeable { /** * Read the database type from the database. We do this manually instead of relying on the built-in mechanism to avoid reading the - * entire database into memory merely to read the type. This is especially important to maintain on master nodes where pipelines are + * entire database into memory merely to read the type. This is especially important to maintain on cluster-manager nodes where pipelines are * validated. If we read the entire database into memory, we could potentially run into low-memory constraints on such nodes where * loading this data would otherwise be wasteful if they are not also ingest nodes. * diff --git a/modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/10_basic.yml b/modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/10_basic.yml index 00ad6f890b0e0..1e1eb8d800b2f 100644 --- a/modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/10_basic.yml +++ b/modules/lang-expression/src/yamlRestTest/resources/rest-api-spec/test/lang_expression/10_basic.yml @@ -7,7 +7,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/10_basic.yml b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/10_basic.yml index 0e853d6273142..44bf84f057f36 100644 --- a/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/10_basic.yml +++ b/modules/lang-mustache/src/yamlRestTest/resources/rest-api-spec/test/lang_mustache/10_basic.yml @@ -7,7 +7,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/10_basic.yml b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/10_basic.yml index e442b40ffb845..fd2aa3f56163b 100644 --- a/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/10_basic.yml +++ b/modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/10_basic.yml @@ -7,7 +7,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/mapper-extras/src/test/resources/org/opensearch/index/mapper/metricbeat-6.0.template.json b/modules/mapper-extras/src/test/resources/org/opensearch/index/mapper/metricbeat-6.0.template.json index f456755feeb93..5a83dbd2128c4 100644 --- a/modules/mapper-extras/src/test/resources/org/opensearch/index/mapper/metricbeat-6.0.template.json +++ b/modules/mapper-extras/src/test/resources/org/opensearch/index/mapper/metricbeat-6.0.template.json @@ -229,7 +229,7 @@ }, "objects": { "properties": { - "master": { + "primary": { "type": "long" }, "total": { @@ -4601,7 +4601,7 @@ "connected_replicas": { "type": "long" }, - "master_offset": { + "primary_offset": { "type": "long" }, "role": { diff --git a/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/aggregations/ChildrenIT.java b/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/aggregations/ChildrenIT.java index 08354cbaaf93b..72c502c616ff8 100644 --- a/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/aggregations/ChildrenIT.java +++ b/modules/parent-join/src/internalClusterTest/java/org/opensearch/join/aggregations/ChildrenIT.java @@ -227,7 +227,7 @@ public void testNonExistingChildType() throws Exception { public void testPostCollection() throws Exception { String indexName = "prodcatalog"; - String masterType = "masterprod"; + String mainType = "mainprod"; String childType = "variantsku"; assertAcked( prepareCreate(indexName).setSettings( @@ -235,7 +235,7 @@ public void testPostCollection() throws Exception { ) .setMapping( addFieldMappings( - buildParentJoinFieldMappingFromSimplifiedDef("join_field", true, masterType, childType), + buildParentJoinFieldMappingFromSimplifiedDef("join_field", true, mainType, childType), "brand", "text", "name", @@ -251,7 +251,7 @@ public void testPostCollection() throws Exception { ); List requests = new ArrayList<>(); - requests.add(createIndexRequest(indexName, masterType, "1", null, "brand", "Levis", "name", "Style 501", "material", "Denim")); + requests.add(createIndexRequest(indexName, mainType, "1", null, "brand", "Levis", "name", "Style 501", "material", "Denim")); requests.add(createIndexRequest(indexName, childType, "3", "1", "color", "blue", "size", "32")); requests.add(createIndexRequest(indexName, childType, "4", "1", "color", "blue", "size", "34")); requests.add(createIndexRequest(indexName, childType, "5", "1", "color", "blue", "size", "36")); @@ -259,9 +259,7 @@ public void testPostCollection() throws Exception { requests.add(createIndexRequest(indexName, childType, "7", "1", "color", "black", "size", "40")); requests.add(createIndexRequest(indexName, childType, "8", "1", "color", "gray", "size", "36")); - requests.add( - createIndexRequest(indexName, masterType, "2", null, "brand", "Wrangler", "name", "Regular Cut", "material", "Leather") - ); + requests.add(createIndexRequest(indexName, mainType, "2", null, "brand", "Wrangler", "name", "Regular Cut", "material", "Leather")); requests.add(createIndexRequest(indexName, childType, "9", "2", "color", "blue", "size", "32")); requests.add(createIndexRequest(indexName, childType, "10", "2", "color", "blue", "size", "34")); requests.add(createIndexRequest(indexName, childType, "12", "2", "color", "black", "size", "36")); diff --git a/modules/reindex/src/test/java/org/opensearch/index/reindex/RetryTests.java b/modules/reindex/src/test/java/org/opensearch/index/reindex/RetryTests.java index 124670dba9510..1c1a55bf59537 100644 --- a/modules/reindex/src/test/java/org/opensearch/index/reindex/RetryTests.java +++ b/modules/reindex/src/test/java/org/opensearch/index/reindex/RetryTests.java @@ -118,18 +118,18 @@ public void testReindex() throws Exception { public void testReindexFromRemote() throws Exception { Function> function = client -> { /* - * Use the master node for the reindex from remote because that node + * Use the cluster-manager node for the reindex from remote because that node * doesn't have a copy of the data on it. */ - NodeInfo masterNode = null; + NodeInfo clusterManagerNode = null; for (NodeInfo candidate : client.admin().cluster().prepareNodesInfo().get().getNodes()) { if (candidate.getNode().isMasterNode()) { - masterNode = candidate; + clusterManagerNode = candidate; } } - assertNotNull(masterNode); + assertNotNull(clusterManagerNode); - TransportAddress address = masterNode.getInfo(HttpInfo.class).getAddress().publishAddress(); + TransportAddress address = clusterManagerNode.getInfo(HttpInfo.class).getAddress().publishAddress(); RemoteInfo remote = new RemoteInfo( "http", address.getAddress(), @@ -262,8 +262,8 @@ private CyclicBarrier blockExecutor(String name, String node) throws Exception { */ private BulkByScrollTask.Status taskStatus(String action) { /* - * We always use the master client because we always start the test requests on the - * master. We do this simply to make sure that the test request is not started on the + * We always use the cluster-manager client because we always start the test requests on the + * cluster-manager. We do this simply to make sure that the test request is not started on the * node who's queue we're manipulating. */ ListTasksResponse response = client().admin().cluster().prepareListTasks().setActions(action).setDetailed(true).get(); diff --git a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/90_remote.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/90_remote.yml index ac8d0730ff283..864d8cb721332 100644 --- a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/90_remote.yml +++ b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/90_remote.yml @@ -7,7 +7,7 @@ body: { "text": "test" } refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -68,7 +68,7 @@ - do: indices.refresh: {} - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -118,7 +118,7 @@ routing: foo refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -169,7 +169,7 @@ body: { "text": "test" } refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -236,7 +236,7 @@ body: { "text": "test" } refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -302,7 +302,7 @@ body: { "text": "test" } refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -358,7 +358,7 @@ body: { "text": "test" } refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -411,7 +411,7 @@ body: { "text": "test", "filtered": "removed" } refresh: true - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } @@ -480,7 +480,7 @@ indices.refresh: {} - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } diff --git a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml index b36593b4b962c..e681c67602f93 100644 --- a/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml +++ b/modules/reindex/src/yamlRestTest/resources/rest-api-spec/test/reindex/95_parent_join.yml @@ -88,7 +88,7 @@ setup: --- "Reindex from remote with parent join field": - # Fetch the http host. We use the host of the master because we know there will always be a master. + # Fetch the http host. We use the host of the cluster-manager because we know there will always be a cluster-manager. - do: cluster.state: {} - set: { master_node: master } diff --git a/modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/10_basic.yml b/modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/10_basic.yml index b932f0d53caad..86f209be3f4c7 100644 --- a/modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/10_basic.yml +++ b/modules/repository-url/src/yamlRestTest/resources/rest-api-spec/test/repository_url/10_basic.yml @@ -102,7 +102,7 @@ teardown: - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: diff --git a/modules/transport-netty4/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml b/modules/transport-netty4/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml index 19728c7d34cff..2225b1bb9ae4e 100644 --- a/modules/transport-netty4/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml +++ b/modules/transport-netty4/src/yamlRestTest/resources/rest-api-spec/test/10_basic.yml @@ -7,7 +7,7 @@ - do: cluster.state: {} - # Get master node id + # Get cluster-manager node id - set: { master_node: master } - do: