Navigation Menu

Skip to content

Commit

Permalink
Use "status" command to check result
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 25, 2014
1 parent e5bb95e commit 96460ab
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 95 deletions.
67 changes: 30 additions & 37 deletions _po/ja/tutorial/1.0.4/add-replica/index.po
Expand Up @@ -370,37 +370,23 @@ msgstr ""
" * `192.168.0.11`\n"
" * `192.168.0.12`"

msgid "You can confirm that, via the status file `live-nodes.json` on each node:"
msgstr "この事は、各ノード上にあるステータスファイル `live-nodes.json` を見ると確認できます:"
msgid "You can confirm that, via the `status` command for each cluster:"
msgstr "この事は、各クラスタに対する `status` コマンドの実行結果を見ると確認できます:"

msgid ""
"~~~\n"
"(on 192.168.0.10, 192.168.0.11)\n"
"# cat ~/droonga/state/live-nodes.json\n"
"{\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.52:7946\"\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.50:7946\"\n"
" }\n"
"}\n"
"~~~"
msgstr ""

msgid ""
"~~~\n"
"(on 192.168.0.12)\n"
"# cat ~/droonga/state/live-nodes.json\n"
"# curl \"http://192.168.0.12:10041/droonga/status\"\n"
"{\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.52:7946\"\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.50:7946\"\n"
" },\n"
" \"192.168.0.12:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.51:7946\"\n"
" \"nodes\": {\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"live\": true\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"live\": true\n"
" },\n"
" \"192.168.0.12:10031/droonga\": {\n"
" \"live\": true\n"
" }\n"
" }\n"
"}\n"
"~~~"
Expand Down Expand Up @@ -446,24 +432,31 @@ msgstr ""
" * `192.168.0.11`\n"
" * `192.168.0.12`"

msgid "You can confirm that, via the `status` command on each node:"
msgstr "この事は、`status` コマンドの実行結果を見ると確認できます:"

msgid ""
"~~~\n"
"(on 192.168.0.10, 192.168.0.11, 192.168.0.12)\n"
"# cat ~/droonga/state/live-nodes.json\n"
"# curl \"http://192.168.0.10:10041/droonga/status\"\n"
"{\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.52:7946\"\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.50:7946\"\n"
" },\n"
" \"192.168.0.12:10031/droonga\": {\n"
" \"serfAddress\": \"192.168.100.51:7946\"\n"
" \"nodes\": {\n"
" \"192.168.0.10:10031/droonga\": {\n"
" \"live\": true\n"
" },\n"
" \"192.168.0.11:10031/droonga\": {\n"
" \"live\": true\n"
" },\n"
" \"192.168.0.12:10031/droonga\": {\n"
" \"live\": true\n"
" }\n"
" }\n"
"}\n"
"~~~"
msgstr ""

msgid "Any node returns same result."
msgstr "いずれのノードも同じ結果を返します。"

msgid ""
"Note that the old cluster named \"alpha\" is gone.\n"
"Now the new cluster \"charlie\" with three replicas works perfectly, instead of "
Expand Down
64 changes: 35 additions & 29 deletions ja/tutorial/1.0.4/add-replica/index.md
Expand Up @@ -200,33 +200,36 @@ cronjobとして実行されるバッチスクリプトによって `load` コ
* `192.168.0.11`
* `192.168.0.12`

この事は、各ノード上にあるステータスファイル `live-nodes.json` を見ると確認できます:
この事は、各クラスタに対する `status` コマンドの実行結果を見ると確認できます:

~~~
(on 192.168.0.10, 192.168.0.11)
# cat ~/droonga/state/live-nodes.json
(for the cluster alpha)
# curl "http://192.168.0.10:10041/droonga/status"
{
"192.168.0.10:10031/droonga": {
"serfAddress": "192.168.100.52:7946"
},
"192.168.0.11:10031/droonga": {
"serfAddress": "192.168.100.50:7946"
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
}
}
}
~~~

~~~
(on 192.168.0.12)
# cat ~/droonga/state/live-nodes.json
# curl "http://192.168.0.12:10041/droonga/status"
{
"192.168.0.10:10031/droonga": {
"serfAddress": "192.168.100.52:7946"
},
"192.168.0.11:10031/droonga": {
"serfAddress": "192.168.100.50:7946"
},
"192.168.0.12:10031/droonga": {
"serfAddress": "192.168.100.51:7946"
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
},
"192.168.0.12:10031/droonga": {
"live": true
}
}
}
~~~
Expand All @@ -250,24 +253,27 @@ cronjobとして実行されるバッチスクリプトによって `load` コ
* `192.168.0.11`
* `192.168.0.12`

この事は、各ノード上にあるステータスファイル `live-nodes.json` を見ると確認できます:
この事は、`status` コマンドの実行結果を見ると確認できます:

~~~
(on 192.168.0.10, 192.168.0.11, 192.168.0.12)
# cat ~/droonga/state/live-nodes.json
# curl "http://192.168.0.10:10041/droonga/status"
{
"192.168.0.10:10031/droonga": {
"serfAddress": "192.168.100.52:7946"
},
"192.168.0.11:10031/droonga": {
"serfAddress": "192.168.100.50:7946"
},
"192.168.0.12:10031/droonga": {
"serfAddress": "192.168.100.51:7946"
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
},
"192.168.0.12:10031/droonga": {
"live": true
}
}
}
~~~

いずれのノードも同じ結果を返します。

「alpha」と仮称した古いクラスタが姿を消している事に注意してください。
この時、2つのreplicaからなる古いクラスタの代わりとして、新しいクラスタ「charlie」は3つのreplicaのもとで完璧に動作しています。

Expand Down
64 changes: 35 additions & 29 deletions tutorial/1.0.4/add-replica/index.md
Expand Up @@ -196,33 +196,36 @@ Then there are two overlapping Droonga clusters theoretically on this time.
* `192.168.0.11`
* `192.168.0.12`

You can confirm that, via the status file `live-nodes.json` on each node:
You can confirm that, via the `status` command for each cluster:

~~~
(on 192.168.0.10, 192.168.0.11)
# cat ~/droonga/state/live-nodes.json
(for the cluster alpha)
# curl "http://192.168.0.10:10041/droonga/status"
{
"192.168.0.10:10031/droonga": {
"serfAddress": "192.168.100.52:7946"
},
"192.168.0.11:10031/droonga": {
"serfAddress": "192.168.100.50:7946"
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
}
}
}
~~~

~~~
(on 192.168.0.12)
# cat ~/droonga/state/live-nodes.json
# curl "http://192.168.0.12:10041/droonga/status"
{
"192.168.0.10:10031/droonga": {
"serfAddress": "192.168.100.52:7946"
},
"192.168.0.11:10031/droonga": {
"serfAddress": "192.168.100.50:7946"
},
"192.168.0.12:10031/droonga": {
"serfAddress": "192.168.100.51:7946"
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
},
"192.168.0.12:10031/droonga": {
"live": true
}
}
}
~~~
Expand All @@ -246,24 +249,27 @@ Then there is just one Droonga clusters on this time.
* `192.168.0.11`
* `192.168.0.12`

You can confirm that, via the status file `live-nodes.json` on each node:
You can confirm that, via the `status` command on each node:

~~~
(on 192.168.0.10, 192.168.0.11, 192.168.0.12)
# cat ~/droonga/state/live-nodes.json
# curl "http://192.168.0.10:10041/droonga/status"
{
"192.168.0.10:10031/droonga": {
"serfAddress": "192.168.100.52:7946"
},
"192.168.0.11:10031/droonga": {
"serfAddress": "192.168.100.50:7946"
},
"192.168.0.12:10031/droonga": {
"serfAddress": "192.168.100.51:7946"
"nodes": {
"192.168.0.10:10031/droonga": {
"live": true
},
"192.168.0.11:10031/droonga": {
"live": true
},
"192.168.0.12:10031/droonga": {
"live": true
}
}
}
~~~

Any node returns same result.

Note that the old cluster named "alpha" is gone.
Now the new cluster "charlie" with three replicas works perfectly, instead of the old one with two replicas.

Expand Down

0 comments on commit 96460ab

Please sign in to comment.