Navigation Menu

Skip to content

Commit

Permalink
Update catalog.json by droonga-engine-modify-catalog command
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Jun 27, 2014
1 parent 8bb9f32 commit c98063e
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 81 deletions.
63 changes: 27 additions & 36 deletions _po/ja/tutorial/1.0.4/add-replica/index.po
Expand Up @@ -145,26 +145,18 @@ msgid ""
msgstr ""

msgid ""
"Then, remember the command line you executed to generate `catalog.json` for yo"
"ur cluster.\n"
"It was:"
msgstr "ここで、以前にクラスタを構築する時に `catalog.json` を生成するために実行したコマンド列を思い出して下さい:"

msgid ""
" (on 192.168.0.10 or 192.168.0.11)\n"
" # droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11 \\\n"
" --output=~/droonga/catalog.json"
"For the new node, you have to setup a `catalog.json` includes only one node, b"
"ased on the existing one on another node."
msgstr ""

msgid ""
"For the new node, you have to generate a `custom.json` includes only one node,"
" with same options except the `--host` option, like:"
msgstr "新しいノード用には、`--host` オプションの値以外はすべて同じ指定で、単一のノードだけを含む `catalog.json` を生成します:"
"新しいノード用には、他のノードにある既存の `catalog.json` を元にして、構成ノードが1つだけの新しい `catalog.json` を用意する"
"必要があります。"

msgid ""
" (on 192.168.0.12)\n"
" # droonga-engine-catalog-generate --hosts=192.168.0.12 \\\n"
" --output=~/droonga/catalog.json"
" # scp 192.168.0.10:~/droonga/catalog.json ~/droonga/\n"
" # droonga-engine-modify-catalog --source=~/droonga/catalog.json \\\n"
" --update \\\n"
" --hosts=192.168.0.12"
msgstr ""

msgid "Let's start the server."
Expand Down Expand Up @@ -347,18 +339,17 @@ msgstr "### 新しいreplicaをクラスタに参加させる"
msgid ""
"After the duplication is successfully done, join the new replica to the existi"
"ng clster.\n"
"Re-generate the `catalog.json` on the newly joining node `192.168.0.12`, with "
"all nodes specified via the `--hosts` option, like:"
"Update the `catalog.json` on the newly joining node `192.168.0.12`, like:"
msgstr ""
"データを正しく複製できたら、新しいreplicaを既存のクラスタに参加させます。\n"
"新たにクラスタに参加するノード `192.168.0.12` 上で、すべてノードを `--hosts` オプションに指定して `catalog.json` "
"を再作成してください:"
"新たにクラスタに参加するノード `192.168.0.12` 上で、以下のようにして `catalog.json` を更新して下さい:"

msgid ""
" (on 192.168.0.12)\n"
" # droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11,192.16"
"8.0.12 \\\n"
" --output=~/droonga/catalog.json"
" # droonga-engine-modify-catalog --source=~/droonga/catalog.json \\\n"
" --update \\\n"
" --add-replica-hosts=192.168.0.10,192.168.0"
".11"
msgstr ""

msgid ""
Expand Down Expand Up @@ -432,13 +423,14 @@ msgstr ""
msgid "Note that the temporary cluster named \"beta\" is gone."
msgstr "「beta」と仮称した一時的なクラスタが姿を消している事に注意してください。"

msgid "Next, copy new `catalog.json` from `192.168.0.12` to others."
msgstr "次に、新しい `catalog.json` を`192.168.0.12` から他のノードにコピーします。"
msgid "Next, update existing `catalog.json` on other nodes, like:"
msgstr "次に、他のノードの既存の `catalog.json` を以下のようにして更新します:"

msgid ""
" (on 192.168.0.12)\n"
" # scp ~/droonga/catalog.json 192.168.0.10:~/droonga/\n"
" # scp ~/droonga/catalog.json 192.168.0.11:~/droonga/"
" (on 192.168.0.10, 192.168.0.11)\n"
" # droonga-engine-modify-catalog --source=~/droonga/catalog.json \\\n"
" --update \\\n"
" --add-replica-hosts=192.168.0.12"
msgstr ""

msgid "Servers detect new `catalog.json` and restart themselves automatically."
Expand Down Expand Up @@ -575,8 +567,9 @@ msgstr ""

msgid ""
" (on 192.168.0.10)\n"
" # droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11 \\\n"
" --output=~/droonga/catalog.json"
" # droonga-engine-modify-catalog --source=~/droonga/catalog.json \\\n"
" --update \\\n"
" --remove-replica-hosts=192.168.0.12"
msgstr ""

msgid ""
Expand Down Expand Up @@ -669,13 +662,11 @@ msgstr ""
"そのため、ノード `192.168.0.10` へ流入してくるメッセージは、既に存在しないものと認識されているノード `192.168.0.12` へは決し"
"て配送されません。"

msgid "Next, copy new `catalog.json` from `192.168.0.10` to others."
msgstr "次に、新しい `catalog.json` を `192.168.0.10` から他のノードへコピーします。"

msgid ""
" (on 192.168.0.10)\n"
" # scp ~/droonga/catalog.json 192.168.0.11:~/droonga/\n"
" # scp ~/droonga/catalog.json 192.168.0.12:~/droonga/"
" (on 192.168.0.11, 192.168.0.12)\n"
" # droonga-engine-modify-catalog --source=~/droonga/catalog.json \\\n"
" --update \\\n"
" --remove-replica-hosts=192.168.0.12"
msgstr ""

msgid "Then there is only one Droonga cluster on this time."
Expand Down
44 changes: 22 additions & 22 deletions ja/tutorial/1.0.4/add-replica/index.md
Expand Up @@ -70,17 +70,13 @@ Droongaのノードの集合には、「replica」と「slice」という2つの
# npm install -g droonga-http-server
# mkdir ~/droonga

ここで、以前にクラスタを構築する時に `catalog.json` を生成するために実行したコマンド列を思い出して下さい:

(on 192.168.0.10 or 192.168.0.11)
# droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11 \
--output=~/droonga/catalog.json

新しいノード用には、`--host` オプションの値以外はすべて同じ指定で、単一のノードだけを含む `catalog.json` を生成します:
新しいノード用には、他のノードにある既存の `catalog.json` を元にして、構成ノードが1つだけの新しい `catalog.json` を用意する必要があります。

(on 192.168.0.12)
# droonga-engine-catalog-generate --hosts=192.168.0.12 \
--output=~/droonga/catalog.json
# scp 192.168.0.10:~/droonga/catalog.json ~/droonga/
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--hosts=192.168.0.12

では、サーバを起動しましょう。

Expand Down Expand Up @@ -193,11 +189,12 @@ cronjobとして実行されるバッチスクリプトによって `load` コ
### 新しいreplicaをクラスタに参加させる

データを正しく複製できたら、新しいreplicaを既存のクラスタに参加させます。
新たにクラスタに参加するノード `192.168.0.12` 上で、すべてノードを `--hosts` オプションに指定して `catalog.json` を再作成してください:
新たにクラスタに参加するノード `192.168.0.12` 上で、以下のようにして `catalog.json` を更新して下さい:

(on 192.168.0.12)
# droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11,192.168.0.12 \
--output=~/droonga/catalog.json
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--add-replica-hosts=192.168.0.10,192.168.0.11

すると、サーバのプロセスが新しい `catalog.json` を検知して、自動的に自分自身を再起動させます。

Expand Down Expand Up @@ -265,11 +262,12 @@ cronjobとして実行されるバッチスクリプトによって `load` コ

「beta」と仮称した一時的なクラスタが姿を消している事に注意してください。

次に、新しい `catalog.json` `192.168.0.12` から他のノードにコピーします。
次に、他のノードの既存の `catalog.json` を以下のようにして更新します:

(on 192.168.0.12)
# scp ~/droonga/catalog.json 192.168.0.10:~/droonga/
# scp ~/droonga/catalog.json 192.168.0.11:~/droonga/
(on 192.168.0.10, 192.168.0.11)
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--add-replica-hosts=192.168.0.12

コピー先のノードのサーバが新しい `catalog.json` を認識して、自動的に再起動します。

Expand Down Expand Up @@ -356,8 +354,9 @@ Droongaクラスタ内のノードは互いに監視しあっており、動作
既存のクラスタからreplicaノードを取り除くには、単に、そのノードを含まないreplicaノードのリストを伴って`catalog.json` を更新するだけでよいです:

(on 192.168.0.10)
# droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11 \
--output=~/droonga/catalog.json
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--remove-replica-hosts=192.168.0.12

この時点で、理論上、部分的に重なり合う2つのDroongaクラスタが存在するようになりました。

Expand Down Expand Up @@ -424,11 +423,12 @@ Droongaクラスタ内のノードは互いに監視しあっており、動作

そのため、ノード `192.168.0.10` へ流入してくるメッセージは、既に存在しないものと認識されているノード `192.168.0.12` へは決して配送されません。

次に、新しい `catalog.json` `192.168.0.10` から他のノードへコピーします。
次に、他のノードの既存の `catalog.json` を以下のようにして更新します:

(on 192.168.0.10)
# scp ~/droonga/catalog.json 192.168.0.11:~/droonga/
# scp ~/droonga/catalog.json 192.168.0.12:~/droonga/
(on 192.168.0.11, 192.168.0.12)
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--remove-replica-hosts=192.168.0.12

この時点で、Droongaクラスタは1つだけ存在する状態となっています。

Expand Down
45 changes: 22 additions & 23 deletions tutorial/1.0.4/add-replica/index.md
Expand Up @@ -61,18 +61,13 @@ First, prepare a new computer, install required softwares and configure them.
# npm install -g droonga-http-server
# mkdir ~/droonga

Then, remember the command line you executed to generate `catalog.json` for your cluster.
It was:

(on 192.168.0.10 or 192.168.0.11)
# droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11 \
--output=~/droonga/catalog.json

For the new node, you have to generate a `custom.json` includes only one node, with same options except the `--host` option, like:
For the new node, you have to setup a `catalog.json` includes only one node, based on the existing one on another node.

(on 192.168.0.12)
# droonga-engine-catalog-generate --hosts=192.168.0.12 \
--output=~/droonga/catalog.json
# scp 192.168.0.10:~/droonga/catalog.json ~/droonga/
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--hosts=192.168.0.12

Let's start the server.

Expand Down Expand Up @@ -188,11 +183,12 @@ Note that you must specify the host name or the IP address of the new replica no
### Join the new replica to the cluster

After the duplication is successfully done, join the new replica to the existing clster.
Re-generate the `catalog.json` on the newly joining node `192.168.0.12`, with all nodes specified via the `--hosts` option, like:
Update the `catalog.json` on the newly joining node `192.168.0.12`, like:

(on 192.168.0.12)
# droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11,192.168.0.12 \
--output=~/droonga/catalog.json
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--add-replica-hosts=192.168.0.10,192.168.0.11

The server process detects new `catalog.json` and restats itself automatically.

Expand Down Expand Up @@ -261,11 +257,12 @@ It knows the cluster charlie includes three nodes, even if other two existing no

Note that the temporary cluster named "beta" is gone.

Next, copy new `catalog.json` from `192.168.0.12` to others.
Next, update existing `catalog.json` on other nodes, like:

(on 192.168.0.12)
# scp ~/droonga/catalog.json 192.168.0.10:~/droonga/
# scp ~/droonga/catalog.json 192.168.0.11:~/droonga/
(on 192.168.0.10, 192.168.0.11)
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--add-replica-hosts=192.168.0.12

Servers detect new `catalog.json` and restart themselves automatically.

Expand Down Expand Up @@ -352,8 +349,9 @@ Assume that there is a Droonga cluster constructed with trhee replica nodes `192
To remove a replica from an existing cluster, you just have to update the "catalog.json" with new list of replica nodes except the node to be removed:

(on 192.168.0.10)
# droonga-engine-catalog-generate --hosts=192.168.0.10,192.168.0.11 \
--output=~/droonga/catalog.json
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--remove-replica-hosts=192.168.0.12

Then there are two overlapping Droonga clusters theoretically on this time.

Expand Down Expand Up @@ -421,11 +419,12 @@ On the other hand, the node `192.168.0.10` with new `catalog.json` knows the clu

So the node `192.168.0.10` doesn't deliver incoming messages to the missing node `192.168.0.12` anymore.

Next, copy new `catalog.json` from `192.168.0.10` to others.
Next, update existing `catalog.json` on other nodes, like:

(on 192.168.0.10)
# scp ~/droonga/catalog.json 192.168.0.11:~/droonga/
# scp ~/droonga/catalog.json 192.168.0.12:~/droonga/
(on 192.168.0.11, 192.168.0.12)
# droonga-engine-modify-catalog --source=~/droonga/catalog.json \
--update \
--remove-replica-hosts=192.168.0.12

Then there is only one Droonga cluster on this time.

Expand Down

0 comments on commit c98063e

Please sign in to comment.