From ae6b304e0eb3c6fd10b7a1fc4a51dead0f37d6cd Mon Sep 17 00:00:00 2001 From: longxiang Date: Thu, 22 Sep 2016 22:17:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E7=AB=A0=E7=AC=AC5?= =?UTF-8?q?=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20_Add_failover.asciidoc | 43 ++++++++----------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/020_Distributed_Cluster/20_Add_failover.asciidoc b/020_Distributed_Cluster/20_Add_failover.asciidoc index 817335903..9982c1af6 100644 --- a/020_Distributed_Cluster/20_Add_failover.asciidoc +++ b/020_Distributed_Cluster/20_Add_failover.asciidoc @@ -1,39 +1,32 @@ -=== Add Failover +=== 添加故障转移 -Running a single node means that you have a single point of failure--there -is no redundancy.((("failover, adding"))) Fortunately, all we need to do to protect ourselves from data -loss is to start another node. +当集群中只有一个节点在运行时,意味着你会有一个单点故障问题——没有冗余。 +幸运的是,我们只需要启动另外一个节点就能保护我们以防数据的丢失。 -.Starting a Second Node +.启动第二个节点 *************************************** -To test what happens when you add a second((("nodes", "starting a second node"))) node, you can start a new node -in exactly the same way as you started the first one (see -<>), and from the same directory. Multiple nodes can -share the same directory. +为了测试第二个节点启动后的情况,你可以在同一个目录内,完全依照启动第一个节点的方式来启动一个新节点(参考<>)。多个节点可以共享同一个目录。 -When you run a second node on the same machine, it automatically discovers -and joins the cluster as long as it has the same `cluster.name` as the first node. -However, for nodes running on different machines -to join the same cluster, you need to configure a list of unicast hosts the nodes can contact -to join the cluster. For more information, see <>. +当你在同一台机器上启动了第二个节点时,只要它和第一个节点有同样的 `cluster.name` 配置,它就会自动发现集群并加入到其中。 +但是在不同机器上启动节点的时候,为了加入到同一集群,你需要配置一个可连接到的单播主机列表。 +详细信息请查看<> *************************************** -If we start a second node, our cluster would look like <>. +如果启动了第二个节点,我们的集群将会如<>所示。 + [[cluster-two-nodes]] -.A two-node cluster--all primary and replica shards are allocated -image::images/elas_0203.png["A two-node cluster"] +.拥有两个节点的集群——所有主分片和副本分片都已被分配 +image::images/elas_0203.png["拥有两个节点的集群"] -The((("clusters", "two-node cluster"))) second node has joined the cluster, and three _replica shards_ have ((("replica shards", "allocated to second node")))been -allocated to it--one for each primary shard. That means that we can lose -either node, and all of our data will be intact. +当第二个节点加入到集群后,3个 _副本复片_ 将会分配到这个节点上——每个主分片对应一个副本分片。 +这意味着当集群内任何一个节点出现问题时,我们的数据都完好无损。 -Any newly indexed document will first be stored on a primary shard, and then copied in parallel to the associated replica shard(s). This ensures that our document can be retrieved from a primary shard or from any of its replicas. +所有新近被索引的文档都将会保存在主分片上,然后被并行的复制到对应的副本分片上。这就保证了我们既可以从主分片又可以从副本分片上获得文档。 -The `cluster-health` now ((("cluster health", "checking after adding second node")))shows a status of `green`, which means that all six -shards (all three primary shards and all three replica shards) are active: +`cluster-health` 现在展示的状态为 `green`,这表示所有6个分片(包括3个主分片和3个副本分片)都在正常运行。 [source,js] -------------------------------------------------- @@ -55,6 +48,6 @@ shards (all three primary shards and all three replica shards) are active: "active_shards_percent_as_number": 100 } -------------------------------------------------- -<1> Cluster `status` is `green`. +<1> 集群 `status` 值为 `green`。 -Our cluster is not only fully functional, but also _always available_. +我们的集群现在不仅仅是正常运行的,并且还处于 _始终可用_ 的状态。 From b1da6307986f66545910fe8fad25c7211982d6ff Mon Sep 17 00:00:00 2001 From: longxiang Date: Sun, 25 Sep 2016 22:19:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8C=89=E7=85=A7reviewer=E5=BB=BA?= =?UTF-8?q?=E8=AE=AE=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 020_Distributed_Cluster/20_Add_failover.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/020_Distributed_Cluster/20_Add_failover.asciidoc b/020_Distributed_Cluster/20_Add_failover.asciidoc index 9982c1af6..05f1a2c52 100644 --- a/020_Distributed_Cluster/20_Add_failover.asciidoc +++ b/020_Distributed_Cluster/20_Add_failover.asciidoc @@ -1,7 +1,7 @@ === 添加故障转移 -当集群中只有一个节点在运行时,意味着你会有一个单点故障问题——没有冗余。 -幸运的是,我们只需要启动另外一个节点就能保护我们以防数据的丢失。 +当集群中只有一个节点在运行时,意味着会有一个单点故障问题——没有冗余。 +幸运的是,我们只需再启动一个节点即可防止数据丢失。 .启动第二个节点 *************************************** @@ -21,7 +21,7 @@ .拥有两个节点的集群——所有主分片和副本分片都已被分配 image::images/elas_0203.png["拥有两个节点的集群"] -当第二个节点加入到集群后,3个 _副本复片_ 将会分配到这个节点上——每个主分片对应一个副本分片。 +当第二个节点加入到集群后,3个 _副本分片_ 将会分配到这个节点上——每个主分片对应一个副本分片。 这意味着当集群内任何一个节点出现问题时,我们的数据都完好无损。 所有新近被索引的文档都将会保存在主分片上,然后被并行的复制到对应的副本分片上。这就保证了我们既可以从主分片又可以从副本分片上获得文档。 From 87597c78741a0c4d46e3cb4d20fcf9ddfe3cda0a Mon Sep 17 00:00:00 2001 From: longxiang Date: Sun, 6 Nov 2016 23:18:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8C=89=E7=85=A7=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E5=90=8D=EF=BC=8Cgreen?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 020_Distributed_Cluster/20_Add_failover.asciidoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/020_Distributed_Cluster/20_Add_failover.asciidoc b/020_Distributed_Cluster/20_Add_failover.asciidoc index 05f1a2c52..956e4599c 100644 --- a/020_Distributed_Cluster/20_Add_failover.asciidoc +++ b/020_Distributed_Cluster/20_Add_failover.asciidoc @@ -1,3 +1,4 @@ +[[_add_failover]] === 添加故障转移 当集群中只有一个节点在运行时,意味着会有一个单点故障问题——没有冗余。 @@ -26,7 +27,7 @@ image::images/elas_0203.png["拥有两个节点的集群"] 所有新近被索引的文档都将会保存在主分片上,然后被并行的复制到对应的副本分片上。这就保证了我们既可以从主分片又可以从副本分片上获得文档。 -`cluster-health` 现在展示的状态为 `green`,这表示所有6个分片(包括3个主分片和3个副本分片)都在正常运行。 +`cluster-health` 现在展示的状态为 `green` ,这表示所有6个分片(包括3个主分片和3个副本分片)都在正常运行。 [source,js] -------------------------------------------------- @@ -48,6 +49,6 @@ image::images/elas_0203.png["拥有两个节点的集群"] "active_shards_percent_as_number": 100 } -------------------------------------------------- -<1> 集群 `status` 值为 `green`。 +<1> 集群 `status` 值为 `green` 。 我们的集群现在不仅仅是正常运行的,并且还处于 _始终可用_ 的状态。