Skip to content

Commit

Permalink
Replace 'master' terminology with 'cluster manager' in modules directory
Browse files Browse the repository at this point in the history
Signed-off-by: Tianli Feng <[email protected]>
  • Loading branch information
Tianli Feng committed May 15, 2022
1 parent e074395 commit 16a30ba
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ teardown:

- do:
cluster.state: {}
# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down Expand Up @@ -113,7 +113,7 @@ teardown:

- do:
cluster.state: {}
# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
},
"objects": {
"properties": {
"master": {
"primary": {
"type": "long"
},
"total": {
Expand Down Expand Up @@ -4601,7 +4601,7 @@
"connected_replicas": {
"type": "long"
},
"master_offset": {
"primary_offset": {
"type": "long"
},
"role": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,15 @@ 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(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
)
.setMapping(
addFieldMappings(
buildParentJoinFieldMappingFromSimplifiedDef("join_field", true, masterType, childType),
buildParentJoinFieldMappingFromSimplifiedDef("join_field", true, mainType, childType),
"brand",
"text",
"name",
Expand All @@ -251,17 +251,15 @@ public void testPostCollection() throws Exception {
);

List<IndexRequestBuilder> 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"));
requests.add(createIndexRequest(indexName, childType, "6", "1", "color", "black", "size", "38"));
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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,18 @@ public void testReindex() throws Exception {
public void testReindexFromRemote() throws Exception {
Function<Client, AbstractBulkByScrollRequestBuilder<?, ?>> 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(),
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ teardown:
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- do:
cluster.state: {}

# Get master node id
# Get cluster-manager node id
- set: { master_node: master }

- do:
Expand Down

0 comments on commit 16a30ba

Please sign in to comment.