YUKI Hiroshi
null+****@clear*****
Fri May 8 20:22:36 JST 2015
YUKI Hiroshi 2015-05-08 20:22:36 +0900 (Fri, 08 May 2015) New Revision: 7ceb6c5e2f7e2699ddbb6845dd7d115a9a931e88 https://github.com/droonga/droonga.org/commit/7ceb6c5e2f7e2699ddbb6845dd7d115a9a931e88 Message: Translate reference of droonga-engine-catalog-modify command Added files: _po/ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.po _po/ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.po ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.md ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.md Added: _po/ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.po (+612 -0) 100644 =================================================================== --- /dev/null +++ _po/ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.po 2015-05-08 20:22:36 +0900 (00d6962) @@ -0,0 +1,612 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2014-11-30 23:19+0900\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +msgid "" +"---\n" +"title: droonga-engine-catalog-modify\n" +"layout: en\n" +"---" +msgstr "" +"---\n" +"title: droonga-engine-catalog-modify\n" +"layout: ja\n" +"---" + +msgid "" +"* TOC\n" +"{:toc}" +msgstr "" + +msgid "## Abstract {#abstract}" +msgstr "## 概要 {#abstract}" + +msgid "" +"`droonga-engine-catalog-modify` modifies an existing `catalog.json` to change " +"the structure of the Droonga clsuter." +msgstr "`droonga-engine-catalog-modify`は、既存の`catalog.json`を変更してDroongaクラスタの構成を変えます。" + +msgid "" +"For most usecase you don't need to use this command.\n" +"Instead, use management commands like [`droonga-engine-join`](../droonga-engin" +"e-join/) or [`droonga-engine-unjoin`](../droonga-engine-unjoin/)." +msgstr "" +"多くの場合において、このコマンドを使う必要はまずありません。代わりに、クラスタ構成の変更には[`droonga-engine-join`](../droon" +"ga-engine-join/)や[`droonga-engine-unjoin`](../droonga-engine-unjoin/)のような管理コマン" +"ドを使って下さい。" + +msgid "## Examples {#examples}" +msgstr "## 例 {#examples}" + +msgid "" +"For example, if there is an existing `catalog.json` at `/tmp/catalog.json` wit" +"h the content:" +msgstr "例えば、`/tmp/catalog.json`の位置に以下のような内容の`catalog.json`があるとします:" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "### Adding new replicas" +msgstr "### 新しいreplicaの追加" + +msgid "" +"A command line to add a new replica node `192.168.100.52` to the cluster's dat" +"aset `Default` is:" +msgstr "クラスタ内のデータセット`Default`に新しいreplicaノード`192.168.100.52`を加えるコマンド列は以下の通りです:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --add-replica-hosts 192.168.100.52\n" +"~~~" +msgstr "" + +msgid "Full version with omitted options is:" +msgstr "省略されたオプションを含めた完全な指定はこのようになります:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --add-replica-hosts 192.168.100.52\n" +"~~~" +msgstr "" + +msgid "" +"This command automatically applies the port number and the tag name same to ex" +"isting other replicas.\n" +"You don't have to specify such information." +msgstr "" +"このコマンドは既存の他のreplicaと同じポート番号とタグ名を自動的に適用します。\n" +"それらの情報を指定する必要はありません。" + +msgid "Modified `catalog.json` is:" +msgstr "変更された`catalog.json`は以下の通りです:" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.52:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "### Removing existing replicas" +msgstr "### 既存のreplicaの削除" + +msgid "" +"A command line to remove an existing replica node `192.168.100.51` from the cl" +"uster's dataset `Default` is:" +msgstr "クラスタ内のデータセット`Default`から既存のreplicaノード`192.168.100.51`を取り除くコマンド列は以下の通りです:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --remove-replica-hosts 192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --remove-replica-hosts 192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "All replica nodes can be removed from the dataset:" +msgstr "データセットから全てのreplicaノードを取り除くこともできます:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --remove-replica-hosts 192.168.100.52,192.168.100.51\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": []\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "" +"However, it is an invalid `catalog.json`.\n" +"You never can add replicas to the blank dataset again by this command itself.\n" +"To fix such a broken `catalog.json`, you need to regenerate it again by [the `" +"droonga-engine-catalog-generate` command](../droonga-engine-catalog-generate/)" +"." +msgstr "" +"しかし、これは`catalog.json`としては不正な内容です。\n" +"このコマンドを使って空のデータセットに対し再びreplicaノードを追加することはできません。\n" +"このような壊れた`catalog.json`を修復するには、[`droonga-engine-catalog-generate`コマンド](../droon" +"ga-engine-catalog-generate/)を使って再生成する必要があります。" + +msgid "### Updating list of replica nodes for multiple datasets at once" +msgstr "### 複数のデータセットのreplicaノードのリストを一度に更新する" + +msgid "" +"A command line to produce two changes: adding a new replica node `192.168.100." +"52` to the dataset `Default` and adding another new replica node `192.168.100." +"61` to the dataset `Testing`, is:" +msgstr "" +"新しいreplicaノード`192.168.100.52`をデータセット`Default`へ、もう1つの新しいreplicaノード`192.168.100." +"61`をデータセット`Testing`へ追加するコマンド列は以下の通りです:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --add-replica-hosts 192.168.100.52 \\\n" +" --dataset Testing \\\n" +" --add-replica-hosts 192.168.100.61\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --add-replica-hosts 192.168.100.52 \\\n" +" --dataset Testing \\\n" +" --add-replica-hosts 192.168.100.61\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.52:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.61:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "" +"Because this command recognizes the port number and the tag name as dataset-sp" +"ecific configurations, `10031` is used for new replica node under the `Default" +"` dataset and `20031` is used for the one under the `Testing` dataset." +msgstr "" +"このコマンドはポート番号とタグ名をデータセット固有の設定として認識するため、`Default`配下の新しいreplicaにはポート番号として`10031`が" +"、`Testing`配下の新しいreplicaにはポート番号として`20031`が使われています。" + +msgid "" +"Another case, a command line to swap replica nodes of two datasets `Default` a" +"nd `Testing` is:" +msgstr "別の場合として、2つのデータセット`Default`と`Testing`の間でreplicaノードを交換するコマンド列も示します:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --replica-hosts 192.168.100.60 \\\n" +" --dataset Testing \\\n" +" --replica-hosts 192.168.100.50,192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --replica-hosts 192.168.100.60 \\\n" +" --dataset Testing \\\n" +" --replica-hosts 192.168.100.50,192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:20031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "" +"Note that each volume's port number is changed.\n" +"Because port numbers are associated to their owner dataset, port numbers are a" +"lso swapped." +msgstr "" +"個々のvolumeのポート番号が変化したことに注意して下さい。\n" +"ポート番号はデータセットの方に紐付けられているため、ポート番号が入れ替わっています。" + +msgid "## Parameters {#parameters}" +msgstr "## パラメータ {#parameters}" + +msgid "" +"`--source=PATH`\n" +": The path to the `catalog.json` to be modified.\n" +" `-` means the standard input.\n" +" It is the path to the `catalog.json` for the `droonga-engine` service on the" +" computer (`/home/droonga-engine/droonga/catalog.json`), by default." +msgstr "" +"`--source=PATH`\n" +": 変更される対象の`catalog.json`の読み込み元パス。\n" +" `-`を指定した場合は標準入力から`catalog.json`を受け取ります。\n" +" 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。\n" +" 既定値は、そのコンピュータ上に設定される`droonga-engine`サービスの`catalog.json`の位置(`/home/droonga-en" +"gine/droonga/catalog.json`)です。" + +msgid "" +"`--output=PATH`\n" +": The output path of modified `catalog.json` to be saved as.\n" +" `-` means the standard output.\n" +" Any existing file at the specified path will be overwritten without confirma" +"tion.\n" +" `-` by default." +msgstr "" +"`--output=PATH`\n" +": 変更された`catalog.json`の保存先パス。\n" +" `-`を指定した場合は標準出力に対して出力します。\n" +" 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。\n" +" 既定値は`-`)です。" + +msgid "" +"`--[no-]update`\n" +": Update the source file itself, or not." +msgstr "" +"`--[no-]update`\n" +": 読み込んだファイル自体を更新するかどうか。" + +msgid "" +" * `--update` overwrites the source file itself given by the `--source` optio" +"n.\n" +" * `--no-update` prints the modified `catalog.json` to the output given by th" +"e `--output` option." +msgstr "" +" * `--update`は、`--source`オプションで指定された入力ファイル自体を上書きします。\n" +" * `--no-update`は、変更後の`catalog.json`を`--output`で指定された出力先に出力します。" + +msgid " `--update` by default." +msgstr " 既定値は`--update`です。" + +msgid "" +"`--dataset=NAME`\n" +": The name of an existing dataset to be modified.\n" +" This can be specified multiple times to modify multiple datasets.\n" +" `Default` by default." +msgstr "" +"`--dataset=NAME`\n" +": 変更する対象の既存データセットの名前。\n" +" 複数のデータセットを変更できるように、このオプションは複数回指定できます。\n" +" 既定値は`Default`です。" + +msgid "" +"`--replica-hosts=NAME1,NAME2,...`\n" +": Host names of engine nodes to be used as replicas in the dataset specified b" +"y the preceding `--dataset` option.\n" +" If you specify this option, all existing replica nodes defined in the datase" +"t are replaced." +msgstr "" +"`--replica-hosts=NAME1,NAME2,...`\n" +": 先行する`--dataset`オプションで定義されたデータセットにおいて、replicaとして使う1つ以上のEngineノードのホスト名。\n" +" このオプションを指定した場合、データセット内の既存のreplicaノードは全て置き換えられます。" + +msgid "" +"`--add-replica-hosts=NAME1,NAME2,...`\n" +": Host names of engine nodes to be added to the cluster as replicas, in the da" +"taset specified by the preceding `--dataset` option." +msgstr "" +"`--add-replica-hosts=NAME1,NAME2,...`\n" +": 先行する`--dataset`オプションで定義されたデータセットに対して追加する、1つ以上のEngineノードのホスト名。" + +msgid "" +"`--remove-replica-hosts=NAME1,NAME2,...`\n" +": Host names of engine nodes to be removed from the cluster, in the dataset sp" +"ecified by the preceding `--dataset` option." +msgstr "" +"`--remove-replica-hosts=NAME1,NAME2,...`\n" +": 先行する`--dataset`オプションで定義されたデータセットから取り除く、1つ以上のEngineノードのホスト名。" + +msgid "## How to install {#install}" +msgstr "## インストール方法 {#install}" + +msgid "This is installed as a part of a rubygems package `droonga-engine`." +msgstr "このコマンドは、Rubygemsのパッケージ`droonga-engine`の一部としてインストールされます。" + +msgid "" +"~~~\n" +"# gem install droonga-engine\n" +"~~~" +msgstr "" Added: _po/ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.po (+612 -0) 100644 =================================================================== --- /dev/null +++ _po/ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.po 2015-05-08 20:22:36 +0900 (00d6962) @@ -0,0 +1,612 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"PO-Revision-Date: 2014-11-30 23:19+0900\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +msgid "" +"---\n" +"title: droonga-engine-catalog-modify\n" +"layout: en\n" +"---" +msgstr "" +"---\n" +"title: droonga-engine-catalog-modify\n" +"layout: ja\n" +"---" + +msgid "" +"* TOC\n" +"{:toc}" +msgstr "" + +msgid "## Abstract {#abstract}" +msgstr "## 概要 {#abstract}" + +msgid "" +"`droonga-engine-catalog-modify` modifies an existing `catalog.json` to change " +"the structure of the Droonga clsuter." +msgstr "`droonga-engine-catalog-modify`は、既存の`catalog.json`を変更してDroongaクラスタの構成を変えます。" + +msgid "" +"For most usecase you don't need to use this command.\n" +"Instead, use management commands like [`droonga-engine-join`](../droonga-engin" +"e-join/) or [`droonga-engine-unjoin`](../droonga-engine-unjoin/)." +msgstr "" +"多くの場合において、このコマンドを使う必要はまずありません。代わりに、クラスタ構成の変更には[`droonga-engine-join`](../droon" +"ga-engine-join/)や[`droonga-engine-unjoin`](../droonga-engine-unjoin/)のような管理コマン" +"ドを使って下さい。" + +msgid "## Examples {#examples}" +msgstr "## 例 {#examples}" + +msgid "" +"For example, if there is an existing `catalog.json` at `/tmp/catalog.json` wit" +"h the content:" +msgstr "例えば、`/tmp/catalog.json`の位置に以下のような内容の`catalog.json`があるとします:" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "### Adding new replicas" +msgstr "### 新しいreplicaの追加" + +msgid "" +"A command line to add a new replica node `192.168.100.52` to the cluster's dat" +"aset `Default` is:" +msgstr "クラスタ内のデータセット`Default`に新しいreplicaノード`192.168.100.52`を加えるコマンド列は以下の通りです:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --add-replica-hosts 192.168.100.52\n" +"~~~" +msgstr "" + +msgid "Full version with omitted options is:" +msgstr "省略されたオプションを含めた完全な指定はこのようになります:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --add-replica-hosts 192.168.100.52\n" +"~~~" +msgstr "" + +msgid "" +"This command automatically applies the port number and the tag name same to ex" +"isting other replicas.\n" +"You don't have to specify such information." +msgstr "" +"このコマンドは既存の他のreplicaと同じポート番号とタグ名を自動的に適用します。\n" +"それらの情報を指定する必要はありません。" + +msgid "Modified `catalog.json` is:" +msgstr "変更された`catalog.json`は以下の通りです:" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.52:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "### Removing existing replicas" +msgstr "### 既存のreplicaの削除" + +msgid "" +"A command line to remove an existing replica node `192.168.100.51` from the cl" +"uster's dataset `Default` is:" +msgstr "クラスタ内のデータセット`Default`から既存のreplicaノード`192.168.100.51`を取り除くコマンド列は以下の通りです:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --remove-replica-hosts 192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --remove-replica-hosts 192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "All replica nodes can be removed from the dataset:" +msgstr "データセットから全てのreplicaノードを取り除くこともできます:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --remove-replica-hosts 192.168.100.52,192.168.100.51\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": []\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "" +"However, it is an invalid `catalog.json`.\n" +"You never can add replicas to the blank dataset again by this command itself.\n" +"To fix such a broken `catalog.json`, you need to regenerate it again by [the `" +"droonga-engine-catalog-generate` command](../droonga-engine-catalog-generate/)" +"." +msgstr "" +"しかし、これは`catalog.json`としては不正な内容です。\n" +"このコマンドを使って空のデータセットに対し再びreplicaノードを追加することはできません。\n" +"このような壊れた`catalog.json`を修復するには、[`droonga-engine-catalog-generate`コマンド](../droon" +"ga-engine-catalog-generate/)を使って再生成する必要があります。" + +msgid "### Updating list of replica nodes for multiple datasets at once" +msgstr "### 複数のデータセットのreplicaノードのリストを一度に更新する" + +msgid "" +"A command line to produce two changes: adding a new replica node `192.168.100." +"52` to the dataset `Default` and adding another new replica node `192.168.100." +"61` to the dataset `Testing`, is:" +msgstr "" +"新しいreplicaノード`192.168.100.52`をデータセット`Default`へ、もう1つの新しいreplicaノード`192.168.100." +"61`をデータセット`Testing`へ追加するコマンド列は以下の通りです:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --add-replica-hosts 192.168.100.52 \\\n" +" --dataset Testing \\\n" +" --add-replica-hosts 192.168.100.61\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --add-replica-hosts 192.168.100.52 \\\n" +" --dataset Testing \\\n" +" --add-replica-hosts 192.168.100.61\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:10031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.52:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:20031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.61:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "" +"Because this command recognizes the port number and the tag name as dataset-sp" +"ecific configurations, `10031` is used for new replica node under the `Default" +"` dataset and `20031` is used for the one under the `Testing` dataset." +msgstr "" +"このコマンドはポート番号とタグ名をデータセット固有の設定として認識するため、`Default`配下の新しいreplicaにはポート番号として`10031`が" +"、`Testing`配下の新しいreplicaにはポート番号として`20031`が使われています。" + +msgid "" +"Another case, a command line to swap replica nodes of two datasets `Default` a" +"nd `Testing` is:" +msgstr "別の場合として、2つのデータセット`Default`と`Testing`の間でreplicaノードを交換するコマンド列も示します:" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --no-update \\\n" +" --replica-hosts 192.168.100.60 \\\n" +" --dataset Testing \\\n" +" --replica-hosts 192.168.100.50,192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"$ droonga-engine-catalog-modify \\\n" +" --source /tmp/catalog.json \\\n" +" --output - \\\n" +" --no-update \\\n" +" --dataset Default \\\n" +" --replica-hosts 192.168.100.60 \\\n" +" --dataset Testing \\\n" +" --replica-hosts 192.168.100.50,192.168.100.51\n" +"~~~" +msgstr "" + +msgid "" +"~~~\n" +"{\n" +" \"version\": 2,\n" +" \"effectiveDate\": \"2015-05-08T09:02:12+00:00\",\n" +" \"datasets\": {\n" +" \"Default\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.60:10031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" },\n" +" \"Testing\": {\n" +" \"nWorkers\": 4,\n" +" \"plugins\": [\"groonga\", \"search\", \"crud\", \"dump\", \"system\", \"catalog\"],\n" +" \"schema\": {},\n" +" \"replicas\": [\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.50:20031/droonga.000\" } }\n" +" ]\n" +" },\n" +" {\n" +" \"dimension\": \"_key\",\n" +" \"slicer\": \"hash\",\n" +" \"slices\": [\n" +" { \"weight\": 100,\n" +" \"volume\": { \"address\": \"192.168.100.51:20031/droonga.000\" } }\n" +" ]\n" +" }\n" +" ]\n" +" }\n" +" }\n" +"}\n" +"~~~" +msgstr "" + +msgid "" +"Note that each volume's port number is changed.\n" +"Because port numbers are associated to their owner dataset, port numbers are a" +"lso swapped." +msgstr "" +"個々のvolumeのポート番号が変化したことに注意して下さい。\n" +"ポート番号はデータセットの方に紐付けられているため、ポート番号が入れ替わっています。" + +msgid "## Parameters {#parameters}" +msgstr "## パラメータ {#parameters}" + +msgid "" +"`--source=PATH`\n" +": The path to the `catalog.json` to be modified.\n" +" `-` means the standard input.\n" +" It is the path to the `catalog.json` for the `droonga-engine` service on the" +" computer (`/home/droonga-engine/droonga/catalog.json`), by default." +msgstr "" +"`--source=PATH`\n" +": 変更される対象の`catalog.json`の読み込み元パス。\n" +" `-`を指定した場合は標準入力から`catalog.json`を受け取ります。\n" +" 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。\n" +" 既定値は、そのコンピュータ上に設定される`droonga-engine`サービスの`catalog.json`の位置(`/home/droonga-en" +"gine/droonga/catalog.json`)です。" + +msgid "" +"`--output=PATH`\n" +": The output path of modified `catalog.json` to be saved as.\n" +" `-` means the standard output.\n" +" Any existing file at the specified path will be overwritten without confirma" +"tion.\n" +" `-` by default." +msgstr "" +"`--output=PATH`\n" +": 変更された`catalog.json`の保存先パス。\n" +" `-`を指定した場合は標準出力に対して出力します。\n" +" 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。\n" +" 既定値は`-`)です。" + +msgid "" +"`--[no-]update`\n" +": Update the source file itself, or not." +msgstr "" +"`--[no-]update`\n" +": 読み込んだファイル自体を更新するかどうか。" + +msgid "" +" * `--update` overwrites the source file itself given by the `--source` optio" +"n.\n" +" * `--no-update` prints the modified `catalog.json` to the output given by th" +"e `--output` option." +msgstr "" +" * `--update`は、`--source`オプションで指定された入力ファイル自体を上書きします。\n" +" * `--no-update`は、変更後の`catalog.json`を`--output`で指定された出力先に出力します。" + +msgid " `--update` by default." +msgstr " 既定値は`--update`です。" + +msgid "" +"`--dataset=NAME`\n" +": The name of an existing dataset to be modified.\n" +" This can be specified multiple times to modify multiple datasets.\n" +" `Default` by default." +msgstr "" +"`--dataset=NAME`\n" +": 変更する対象の既存データセットの名前。\n" +" 複数のデータセットを変更できるように、このオプションは複数回指定できます。\n" +" 既定値は`Default`です。" + +msgid "" +"`--replica-hosts=NAME1,NAME2,...`\n" +": Host names of engine nodes to be used as replicas in the dataset specified b" +"y the preceding `--dataset` option.\n" +" If you specify this option, all existing replica nodes defined in the datase" +"t are replaced." +msgstr "" +"`--replica-hosts=NAME1,NAME2,...`\n" +": 先行する`--dataset`オプションで定義されたデータセットにおいて、replicaとして使う1つ以上のEngineノードのホスト名。\n" +" このオプションを指定した場合、データセット内の既存のreplicaノードは全て置き換えられます。" + +msgid "" +"`--add-replica-hosts=NAME1,NAME2,...`\n" +": Host names of engine nodes to be added to the cluster as replicas, in the da" +"taset specified by the preceding `--dataset` option." +msgstr "" +"`--add-replica-hosts=NAME1,NAME2,...`\n" +": 先行する`--dataset`オプションで定義されたデータセットに対して追加する、1つ以上のEngineノードのホスト名。" + +msgid "" +"`--remove-replica-hosts=NAME1,NAME2,...`\n" +": Host names of engine nodes to be removed from the cluster, in the dataset sp" +"ecified by the preceding `--dataset` option." +msgstr "" +"`--remove-replica-hosts=NAME1,NAME2,...`\n" +": 先行する`--dataset`オプションで定義されたデータセットから取り除く、1つ以上のEngineノードのホスト名。" + +msgid "## How to install {#install}" +msgstr "## インストール方法 {#install}" + +msgid "This is installed as a part of a rubygems package `droonga-engine`." +msgstr "このコマンドは、Rubygemsのパッケージ`droonga-engine`の一部としてインストールされます。" + +msgid "" +"~~~\n" +"# gem install droonga-engine\n" +"~~~" +msgstr "" Added: ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.md (+474 -0) 100644 =================================================================== --- /dev/null +++ ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.md 2015-05-08 20:22:36 +0900 (e36a495) @@ -0,0 +1,474 @@ +--- +title: droonga-engine-catalog-modify +layout: ja +--- + +{% comment %} +############################################## + THIS FILE IS AUTOMATICALLY GENERATED FROM + "_po/ja/reference/1.1.0/command-line-tools/droonga-engine-catalog-modify/index.po" + DO NOT EDIT THIS FILE MANUALLY! +############################################## +{% endcomment %} + + +* TOC +{:toc} + +## 概要 {#abstract} + +`droonga-engine-catalog-modify`は、既存の`catalog.json`を変更してDroongaクラスタの構成を変えます。 + +多くの場合において、このコマンドを使う必要はまずありません。代わりに、クラスタ構成の変更には[`droonga-engine-join`](../droonga-engine-join/)や[`droonga-engine-unjoin`](../droonga-engine-unjoin/)のような管理コマンドを使って下さい。 + +## 例 {#examples} + +例えば、`/tmp/catalog.json`の位置に以下のような内容の`catalog.json`があるとします: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +### 新しいreplicaの追加 + +クラスタ内のデータセット`Default`に新しいreplicaノード`192.168.100.52`を加えるコマンド列は以下の通りです: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --add-replica-hosts 192.168.100.52 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --add-replica-hosts 192.168.100.52 +~~~ + +このコマンドは既存の他のreplicaと同じポート番号とタグ名を自動的に適用します。 +それらの情報を指定する必要はありません。 + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.52:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +### 既存のreplicaの削除 + +クラスタ内のデータセット`Default`から既存のreplicaノード`192.168.100.51`を取り除くコマンド列は以下の通りです: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --remove-replica-hosts 192.168.100.51 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --remove-replica-hosts 192.168.100.51 +~~~ + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +データセットから全てのreplicaノードを取り除くこともできます: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --remove-replica-hosts 192.168.100.52,192.168.100.51 +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +しかし、これは`catalog.json`としては不正な内容です。 +このコマンドを使って空のデータセットに対し再びreplicaノードを追加することはできません。 +このような壊れた`catalog.json`を修復するには、[`droonga-engine-catalog-generate`コマンド](../droonga-engine-catalog-generate/)を使って再生成する必要があります。 + + +### 複数のデータセットのreplicaノードのリストを一度に更新する + +新しいreplicaノード`192.168.100.52`をデータセット`Default`へ、もう1つの新しいreplicaノード`192.168.100.61`をデータセット`Testing`へ追加するコマンド列は以下の通りです: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --add-replica-hosts 192.168.100.52 \ + --dataset Testing \ + --add-replica-hosts 192.168.100.61 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --add-replica-hosts 192.168.100.52 \ + --dataset Testing \ + --add-replica-hosts 192.168.100.61 +~~~ + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.52:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.61:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +このコマンドはポート番号とタグ名をデータセット固有の設定として認識するため、`Default`配下の新しいreplicaにはポート番号として`10031`が、`Testing`配下の新しいreplicaにはポート番号として`20031`が使われています。 + +別の場合として、2つのデータセット`Default`と`Testing`の間でreplicaノードを交換するコマンド列も示します: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --replica-hosts 192.168.100.60 \ + --dataset Testing \ + --replica-hosts 192.168.100.50,192.168.100.51 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --replica-hosts 192.168.100.60 \ + --dataset Testing \ + --replica-hosts 192.168.100.50,192.168.100.51 +~~~ + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:20031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +個々のvolumeのポート番号が変化したことに注意して下さい。 +ポート番号はデータセットの方に紐付けられているため、ポート番号が入れ替わっています。 + +## パラメータ {#parameters} + +`--source=PATH` +: 変更される対象の`catalog.json`の読み込み元パス。 + `-`を指定した場合は標準入力から`catalog.json`を受け取ります。 + 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。 + 既定値は、そのコンピュータ上に設定される`droonga-engine`サービスの`catalog.json`の位置(`/home/droonga-engine/droonga/catalog.json`)です。 + +`--output=PATH` +: 変更された`catalog.json`の保存先パス。 + `-`を指定した場合は標準出力に対して出力します。 + 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。 + 既定値は`-`)です。 + +`--[no-]update` +: 読み込んだファイル自体を更新するかどうか。 + + * `--update`は、`--source`オプションで指定された入力ファイル自体を上書きします。 + * `--no-update`は、変更後の`catalog.json`を`--output`で指定された出力先に出力します。 + + 既定値は`--update`です。 + +`--dataset=NAME` +: 変更する対象の既存データセットの名前。 + 複数のデータセットを変更できるように、このオプションは複数回指定できます。 + 既定値は`Default`です。 + +`--replica-hosts=NAME1,NAME2,...` +: 先行する`--dataset`オプションで定義されたデータセットにおいて、replicaとして使う1つ以上のEngineノードのホスト名。 + このオプションを指定した場合、データセット内の既存のreplicaノードは全て置き換えられます。 + +`--add-replica-hosts=NAME1,NAME2,...` +: 先行する`--dataset`オプションで定義されたデータセットに対して追加する、1つ以上のEngineノードのホスト名。 + +`--remove-replica-hosts=NAME1,NAME2,...` +: 先行する`--dataset`オプションで定義されたデータセットから取り除く、1つ以上のEngineノードのホスト名。 + +## インストール方法 {#install} + +このコマンドは、Rubygemsのパッケージ`droonga-engine`の一部としてインストールされます。 + +~~~ +# gem install droonga-engine +~~~ + Added: ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.md (+474 -0) 100644 =================================================================== --- /dev/null +++ ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.md 2015-05-08 20:22:36 +0900 (4a2b9b6) @@ -0,0 +1,474 @@ +--- +title: droonga-engine-catalog-modify +layout: ja +--- + +{% comment %} +############################################## + THIS FILE IS AUTOMATICALLY GENERATED FROM + "_po/ja/reference/1.1.1/command-line-tools/droonga-engine-catalog-modify/index.po" + DO NOT EDIT THIS FILE MANUALLY! +############################################## +{% endcomment %} + + +* TOC +{:toc} + +## 概要 {#abstract} + +`droonga-engine-catalog-modify`は、既存の`catalog.json`を変更してDroongaクラスタの構成を変えます。 + +多くの場合において、このコマンドを使う必要はまずありません。代わりに、クラスタ構成の変更には[`droonga-engine-join`](../droonga-engine-join/)や[`droonga-engine-unjoin`](../droonga-engine-unjoin/)のような管理コマンドを使って下さい。 + +## 例 {#examples} + +例えば、`/tmp/catalog.json`の位置に以下のような内容の`catalog.json`があるとします: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +### 新しいreplicaの追加 + +クラスタ内のデータセット`Default`に新しいreplicaノード`192.168.100.52`を加えるコマンド列は以下の通りです: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --add-replica-hosts 192.168.100.52 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --add-replica-hosts 192.168.100.52 +~~~ + +このコマンドは既存の他のreplicaと同じポート番号とタグ名を自動的に適用します。 +それらの情報を指定する必要はありません。 + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.52:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +### 既存のreplicaの削除 + +クラスタ内のデータセット`Default`から既存のreplicaノード`192.168.100.51`を取り除くコマンド列は以下の通りです: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --remove-replica-hosts 192.168.100.51 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --remove-replica-hosts 192.168.100.51 +~~~ + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +データセットから全てのreplicaノードを取り除くこともできます: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --remove-replica-hosts 192.168.100.52,192.168.100.51 +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +しかし、これは`catalog.json`としては不正な内容です。 +このコマンドを使って空のデータセットに対し再びreplicaノードを追加することはできません。 +このような壊れた`catalog.json`を修復するには、[`droonga-engine-catalog-generate`コマンド](../droonga-engine-catalog-generate/)を使って再生成する必要があります。 + + +### 複数のデータセットのreplicaノードのリストを一度に更新する + +新しいreplicaノード`192.168.100.52`をデータセット`Default`へ、もう1つの新しいreplicaノード`192.168.100.61`をデータセット`Testing`へ追加するコマンド列は以下の通りです: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --add-replica-hosts 192.168.100.52 \ + --dataset Testing \ + --add-replica-hosts 192.168.100.61 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --add-replica-hosts 192.168.100.52 \ + --dataset Testing \ + --add-replica-hosts 192.168.100.61 +~~~ + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:10031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.52:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:20031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.61:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +このコマンドはポート番号とタグ名をデータセット固有の設定として認識するため、`Default`配下の新しいreplicaにはポート番号として`10031`が、`Testing`配下の新しいreplicaにはポート番号として`20031`が使われています。 + +別の場合として、2つのデータセット`Default`と`Testing`の間でreplicaノードを交換するコマンド列も示します: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --no-update \ + --replica-hosts 192.168.100.60 \ + --dataset Testing \ + --replica-hosts 192.168.100.50,192.168.100.51 +~~~ + +省略されたオプションを含めた完全な指定はこのようになります: + +~~~ +$ droonga-engine-catalog-modify \ + --source /tmp/catalog.json \ + --output - \ + --no-update \ + --dataset Default \ + --replica-hosts 192.168.100.60 \ + --dataset Testing \ + --replica-hosts 192.168.100.50,192.168.100.51 +~~~ + +変更された`catalog.json`は以下の通りです: + +~~~ +{ + "version": 2, + "effectiveDate": "2015-05-08T09:02:12+00:00", + "datasets": { + "Default": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.60:10031/droonga.000" } } + ] + } + ] + }, + "Testing": { + "nWorkers": 4, + "plugins": ["groonga", "search", "crud", "dump", "system", "catalog"], + "schema": {}, + "replicas": [ + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.50:20031/droonga.000" } } + ] + }, + { + "dimension": "_key", + "slicer": "hash", + "slices": [ + { "weight": 100, + "volume": { "address": "192.168.100.51:20031/droonga.000" } } + ] + } + ] + } + } +} +~~~ + +個々のvolumeのポート番号が変化したことに注意して下さい。 +ポート番号はデータセットの方に紐付けられているため、ポート番号が入れ替わっています。 + +## パラメータ {#parameters} + +`--source=PATH` +: 変更される対象の`catalog.json`の読み込み元パス。 + `-`を指定した場合は標準入力から`catalog.json`を受け取ります。 + 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。 + 既定値は、そのコンピュータ上に設定される`droonga-engine`サービスの`catalog.json`の位置(`/home/droonga-engine/droonga/catalog.json`)です。 + +`--output=PATH` +: 変更された`catalog.json`の保存先パス。 + `-`を指定した場合は標準出力に対して出力します。 + 指定されたパスの位置にある既存のファイルは、確認無しに上書きされます。 + 既定値は`-`)です。 + +`--[no-]update` +: 読み込んだファイル自体を更新するかどうか。 + + * `--update`は、`--source`オプションで指定された入力ファイル自体を上書きします。 + * `--no-update`は、変更後の`catalog.json`を`--output`で指定された出力先に出力します。 + + 既定値は`--update`です。 + +`--dataset=NAME` +: 変更する対象の既存データセットの名前。 + 複数のデータセットを変更できるように、このオプションは複数回指定できます。 + 既定値は`Default`です。 + +`--replica-hosts=NAME1,NAME2,...` +: 先行する`--dataset`オプションで定義されたデータセットにおいて、replicaとして使う1つ以上のEngineノードのホスト名。 + このオプションを指定した場合、データセット内の既存のreplicaノードは全て置き換えられます。 + +`--add-replica-hosts=NAME1,NAME2,...` +: 先行する`--dataset`オプションで定義されたデータセットに対して追加する、1つ以上のEngineノードのホスト名。 + +`--remove-replica-hosts=NAME1,NAME2,...` +: 先行する`--dataset`オプションで定義されたデータセットから取り除く、1つ以上のEngineノードのホスト名。 + +## インストール方法 {#install} + +このコマンドは、Rubygemsのパッケージ`droonga-engine`の一部としてインストールされます。 + +~~~ +# gem install droonga-engine +~~~ +