This is an automated email from the ASF dual-hosted git repository.
hulee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new fc52a04c8 Replace non-inclusive terms in tutorial.md (#2039)
fc52a04c8 is described below
commit fc52a04c89264d389b9d212a0ca2f213531d7574
Author: Qi (Quincy) Qu <[email protected]>
AuthorDate: Mon Apr 18 10:57:29 2022 -0700
Replace non-inclusive terms in tutorial.md (#2039)
---
website/0.9.9/src/site/markdown/Tutorial.md | 46 ++++++++++++++---------------
website/1.0.2/src/site/markdown/Tutorial.md | 46 ++++++++++++++---------------
2 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/website/0.9.9/src/site/markdown/Tutorial.md
b/website/0.9.9/src/site/markdown/Tutorial.md
index a956161f2..5cdb6cf3c 100644
--- a/website/0.9.9/src/site/markdown/Tutorial.md
+++ b/website/0.9.9/src/site/markdown/Tutorial.md
@@ -133,36 +133,36 @@ For example, in a search system, one might need more than
one node serving the s
The allowed states:
-* MASTER
-* SLAVE
+* LEADER
+* STANDBY
* OFFLINE
The allowed transitions:
-* OFFLINE to SLAVE
-* SLAVE to OFFLINE
-* SLAVE to MASTER
-* MASTER to SLAVE
+* OFFLINE to STANDBY
+* STANDBY to OFFLINE
+* STANDBY to LEADER
+* LEADER to STANDBY
The constraints:
-* no more than 1 MASTER per partition
-* the rest of the replicas should be slaves
+* no more than 1 LEADER per partition
+* the rest of the replicas should be standbys
-The following snippet shows how to declare the state model and constraints for
the MASTER-SLAVE model.
+The following snippet shows how to declare the state model and constraints for
the LEADER-STANDBY model.
```
-String STATE_MODEL_NAME = "MasterSlave";
+String STATE_MODEL_NAME = "LeaderStandby";
StateModelDefinition.Builder builder = new
StateModelDefinition.Builder(STATE_MODEL_NAME);
// Define your own states: those are opaque strings to Helix
// Only the topology of the state machine (initial state, transitions,
priorities, final DROPPED state) is meaningful to Helix
-String MASTER = "MASTER";
-String SLAVE = "SLAVE";
+String LEADER = "LEADER";
+String STANDBY = "STANDBY";
String OFFLINE = "OFFLINE";
// Add states and their rank to indicate priority. A lower rank corresponds to
a higher priority
-builder.addState(MASTER, 1);
-builder.addState(SLAVE, 2);
+builder.addState(LEADER, 1);
+builder.addState(STANDBY, 2);
builder.addState(OFFLINE);
// Note the special inclusion of the DROPPED state (REQUIRED)
builder.addState(HelixDefinedState.DROPPED.name());
@@ -171,24 +171,24 @@ builder.addState(HelixDefinedState.DROPPED.name());
builder.initialState(OFFLINE);
// Add transitions between the states.
-builder.addTransition(OFFLINE, SLAVE);
-builder.addTransition(SLAVE, OFFLINE);
-builder.addTransition(SLAVE, MASTER);
-builder.addTransition(MASTER, SLAVE);
+builder.addTransition(OFFLINE, STANDBY);
+builder.addTransition(STANDBY, OFFLINE);
+builder.addTransition(STANDBY, LEADER);
+builder.addTransition(LEADER, STANDBY);
// There must be a path to DROPPED from each state (REQUIRED)
builder.addTransition(OFFLINE, HelixDefinedState.DROPPED.name());
// set constraints on states
-// static constraint: upper bound of 1 MASTER
-builder.upperBound(MASTER, 1);
+// static constraint: upper bound of 1 LEADER
+builder.upperBound(LEADER, 1);
// dynamic constraint: R means it should be derived based on the replication
factor for the cluster
// this allows a different replication factor for each resource without
// having to define a new state model
-builder.dynamicUpperBound(SLAVE, "R");
+builder.dynamicUpperBound(STANDBY, "R");
StateModelDefinition myStateModel = builder.build();
admin.addStateModelDef(CLUSTER_NAME, STATE_MODEL_NAME, myStateModel);
@@ -197,7 +197,7 @@ admin.addStateModelDef(CLUSTER_NAME, STATE_MODEL_NAME,
myStateModel);
##### Assigning Partitions to Nodes
The final goal of Helix is to ensure that the constraints on the state model
are satisfied.
-Helix does this by assigning a __state__ to a partition (such as MASTER,
SLAVE), and placing it on a particular node.
+Helix does this by assigning a __state__ to a partition (such as LEADER,
STANDBY), and placing it on a particular node.
There are 3 assignment modes Helix can operate in:
@@ -210,7 +210,7 @@ For more information on the assignment modes, see the
[Rebalancing Algorithms](.
```
String RESOURCE_NAME = "MyDB";
int NUM_PARTITIONS = 6;
-STATE_MODEL_NAME = "MasterSlave";
+STATE_MODEL_NAME = "LeaderStandby";
String MODE = "SEMI_AUTO";
int NUM_REPLICAS = 2;
diff --git a/website/1.0.2/src/site/markdown/Tutorial.md
b/website/1.0.2/src/site/markdown/Tutorial.md
index 5a761e774..6616f7596 100644
--- a/website/1.0.2/src/site/markdown/Tutorial.md
+++ b/website/1.0.2/src/site/markdown/Tutorial.md
@@ -136,36 +136,36 @@ For example, in a search system, one might need more than
one node serving the s
The allowed states:
-* MASTER
-* SLAVE
+* LEADER
+* STANDBY
* OFFLINE
The allowed transitions:
-* OFFLINE to SLAVE
-* SLAVE to OFFLINE
-* SLAVE to MASTER
-* MASTER to SLAVE
+* OFFLINE to STANDBY
+* STANDBY to OFFLINE
+* STANDBY to LEADER
+* LEADER to STANDBY
The constraints:
-* no more than 1 MASTER per partition
-* the rest of the replicas should be slaves
+* no more than 1 LEADER per partition
+* the rest of the replicas should be STANDBYs
-The following snippet shows how to declare the state model and constraints for
the MASTER-SLAVE model.
+The following snippet shows how to declare the state model and constraints for
the LEADER-STANDBY model.
```
-String STATE_MODEL_NAME = "MasterSlave";
+String STATE_MODEL_NAME = "LeaderStandby";
StateModelDefinition.Builder builder = new
StateModelDefinition.Builder(STATE_MODEL_NAME);
// Define your own states: those are opaque strings to Helix
// Only the topology of the state machine (initial state, transitions,
priorities, final DROPPED state) is meaningful to Helix
-String MASTER = "MASTER";
-String SLAVE = "SLAVE";
+String LEADER = "LEADER";
+String STANDBY = "STANDBY";
String OFFLINE = "OFFLINE";
// Add states and their rank to indicate priority. A lower rank corresponds to
a higher priority
-builder.addState(MASTER, 1);
-builder.addState(SLAVE, 2);
+builder.addState(LEADER, 1);
+builder.addState(STANDBY, 2);
builder.addState(OFFLINE);
// Note the special inclusion of the DROPPED state (REQUIRED)
builder.addState(HelixDefinedState.DROPPED.name());
@@ -174,24 +174,24 @@ builder.addState(HelixDefinedState.DROPPED.name());
builder.initialState(OFFLINE);
// Add transitions between the states.
-builder.addTransition(OFFLINE, SLAVE);
-builder.addTransition(SLAVE, OFFLINE);
-builder.addTransition(SLAVE, MASTER);
-builder.addTransition(MASTER, SLAVE);
+builder.addTransition(OFFLINE, STANDBY);
+builder.addTransition(STANDBY, OFFLINE);
+builder.addTransition(STANDBY, LEADER);
+builder.addTransition(LEADER, STANDBY);
// There must be a path to DROPPED from each state (REQUIRED)
builder.addTransition(OFFLINE, HelixDefinedState.DROPPED.name());
// set constraints on states
-// static constraint: upper bound of 1 MASTER
-builder.upperBound(MASTER, 1);
+// static constraint: upper bound of 1 LEADER
+builder.upperBound(LEADER, 1);
// dynamic constraint: R means it should be derived based on the replication
factor for the cluster
// this allows a different replication factor for each resource without
// having to define a new state model
-builder.dynamicUpperBound(SLAVE, "R");
+builder.dynamicUpperBound(STANDBY, "R");
StateModelDefinition myStateModel = builder.build();
admin.addStateModelDef(CLUSTER_NAME, STATE_MODEL_NAME, myStateModel);
@@ -200,7 +200,7 @@ admin.addStateModelDef(CLUSTER_NAME, STATE_MODEL_NAME,
myStateModel);
##### Assigning Partitions to Nodes
The final goal of Helix is to ensure that the constraints on the state model
are satisfied.
-Helix does this by assigning a __state__ to a partition (such as MASTER,
SLAVE), and placing it on a particular node.
+Helix does this by assigning a __state__ to a partition (such as LEADER,
STANDBY), and placing it on a particular node.
There are 3 assignment modes Helix can operate in:
@@ -213,7 +213,7 @@ For more information on the assignment modes, see the
[Rebalancing Algorithms](.
```
String RESOURCE_NAME = "MyDB";
int NUM_PARTITIONS = 6;
-String STATE_MODEL_NAME = "MasterSlave";
+String STATE_MODEL_NAME = "LeaderStandby";
String MODE = "SEMI_AUTO";
int NUM_REPLICAS = 2;