YUKI Hiroshi
null+****@clear*****
Wed Nov 19 18:48:40 JST 2014
YUKI Hiroshi 2014-11-19 18:48:40 +0900 (Wed, 19 Nov 2014) New Revision: df44d5f51adf00a5f3389fedce617274bc2bf733 https://github.com/droonga/droonga.org/commit/df44d5f51adf00a5f3389fedce617274bc2bf733 Message: Remove extra parameter to bypass caches Modified files: tutorial/1.0.8/add-replica/index.md tutorial/1.0.8/dump-restore/index.md Modified: tutorial/1.0.8/add-replica/index.md (+10 -18) =================================================================== --- tutorial/1.0.8/add-replica/index.md 2014-11-19 18:44:19 +0900 (d75a409) +++ tutorial/1.0.8/add-replica/index.md 2014-11-19 18:48:40 +0900 (b5cc3da) @@ -83,7 +83,7 @@ Currently, the new node doesn't work as a node of the existing cluster. You can confirm that, via the `system.status` command: ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -94,7 +94,7 @@ $ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." } } } -$ curl "http://node1:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node1:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -105,7 +105,7 @@ $ curl "http://node1:10041/droonga/system/status?_=$(date +%s)" | jq "." } } } -$ curl "http://node2:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node2:10041/droonga/system/status" | jq "." { "nodes": { "node2:10031/droonga": { @@ -162,7 +162,7 @@ All nodes' `catalog.json` are also updated, and now, yes, the new node starts wo You can confirm that they are working as a cluster, via the `system.status` command: ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -178,8 +178,6 @@ $ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." } ~~~ -Note that adding an extra unique parameter for each request, to bypass old resposne caches. - ### Resume inpouring of "write" requests OK, it's the time. @@ -220,7 +218,7 @@ Now, the node has been successfully unjoined from the cluster. You can confirm that the `node2` is successfully unjoined, via the `system.status` command: ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -231,7 +229,7 @@ $ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." } } } -$ curl "http://node1:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node1:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -242,7 +240,7 @@ $ curl "http://node1:10041/droonga/system/status?_=$(date +%s)" | jq "." } } } -$ curl "http://node2:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node2:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -255,8 +253,6 @@ $ curl "http://node2:10041/droonga/system/status?_=$(date +%s)" | jq "." } ~~~ -Note that adding an extra unique parameter for each request, to bypass old resposne caches. - Look at the point that the `node2` also says `node2` is not a member of the cluster. This is the difference between a node unjoined from a cluster and a new node. @@ -283,7 +279,7 @@ Now the node has been gone. You can confirm that via the `system.status` command: ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -293,8 +289,6 @@ $ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." } ~~~ -Note that adding an extra unique parameter for each request, to bypass old resposne caches. - ### Add a new replica Next, setup the new replica `node2`. @@ -333,7 +327,7 @@ Finally a Droonga cluster constructed with two nodes `node0` and `node2` is here You can confirm that, via the `system.status` command: ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -344,7 +338,7 @@ $ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." } } } -$ curl "http://node2:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node2:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -357,8 +351,6 @@ $ curl "http://node2:10041/droonga/system/status?_=$(date +%s)" | jq "." } ~~~ -Note that adding an extra unique parameter for each request, to bypass old resposne caches. - ## Conclusion In this tutorial, you did add a new replica node to an existing [Droonga][] cluster. Modified: tutorial/1.0.8/dump-restore/index.md (+7 -7) =================================================================== --- tutorial/1.0.8/dump-restore/index.md 2014-11-19 18:44:19 +0900 (a2e87ab) +++ tutorial/1.0.8/dump-restore/index.md 2014-11-19 18:48:40 +0900 (ad2a84a) @@ -169,7 +169,7 @@ $ curl "$endpoint/d/table_remove?name=Term" | jq "." After that the cluster becomes empty. Confirm it: ~~~ -$ curl "$endpoint/d/table_list?_=$(date +%s)" | jq "." +$ curl "$endpoint/d/table_list" | jq "." [ [ 0, @@ -330,16 +330,16 @@ Construct two clusters by `droonga-engine-catalog-modify` and make one cluster e (on node1) # droonga-engine-catalog-modify --replica-hosts=node1 $ endpoint="http://node1:10041" -$ curl "$endpoint/d/table_remove?name=Location&_=$(date +%s)" -$ curl "$endpoint/d/table_remove?name=Store&_=$(date +%s)" -$ curl "$endpoint/d/table_remove?name=Term&_=$(date +%s)" +$ curl "$endpoint/d/table_remove?name=Location" +$ curl "$endpoint/d/table_remove?name=Store" +$ curl "$endpoint/d/table_remove?name=Term" ~~~ After that there are two clusters: one contains `node0` with data, another contains `node1` with no data. Confirm it: ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { @@ -398,7 +398,7 @@ $ curl "http://node0:10041/d/select?table=Store&output_columns=name&limit=10&_=$ ] ] ] -$ curl "http://node1:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node1:10041/droonga/system/status" | jq "." { "nodes": { "node1:10031/droonga": { @@ -521,7 +521,7 @@ Run following command lines to unite these two clusters: After that there is just one cluster - yes, it's the initial state. ~~~ -$ curl "http://node0:10041/droonga/system/status?_=$(date +%s)" | jq "." +$ curl "http://node0:10041/droonga/system/status" | jq "." { "nodes": { "node0:10031/droonga": { -------------- next part -------------- HTML����������������������������...下載