[Groonga-commit] droonga/droonga.org at 4c5c69f [gh-pages] Fix dataset name: Starbucks -> Default

Back to archive index

KITAITI Makoto null+****@clear*****
Mon Nov 16 01:16:46 JST 2015


KITAITI Makoto	2015-11-16 01:16:46 +0900 (Mon, 16 Nov 2015)

  New Revision: 4c5c69f7d8df48456d014850880feaeda1d42e76
  https://github.com/droonga/droonga.org/commit/4c5c69f7d8df48456d014850880feaeda1d42e76

  Merged 83212a0: Merge pull request #20 from KitaitiMakoto/typos

  Message:
    Fix dataset name: Starbucks -> Default
    
    Now `Default` is used in basic tutorial which is referenced by
    other advanced tutorials.

  Modified files:
    tutorial/1.1.2/plugin-development/adapter/index.md
    tutorial/1.1.2/plugin-development/handler/index.md

  Modified: tutorial/1.1.2/plugin-development/adapter/index.md (+11 -11)
===================================================================
--- tutorial/1.1.2/plugin-development/adapter/index.md    2015-11-16 01:09:16 +0900 (3f5f9bc)
+++ tutorial/1.1.2/plugin-development/adapter/index.md    2015-11-16 01:16:46 +0900 (1acccf6)
@@ -93,7 +93,7 @@ catalog.json:
 ~~~
 (snip)
       "datasets": {
-        "Starbucks": {
+        "Default": {
           (snip)
           "plugins": ["sample-logger", "groonga", "crud", "search", "dump", "status"],
 (snip)
@@ -118,7 +118,7 @@ search-columbus.json:
 
 ~~~json
 {
-  "dataset" : "Starbucks",
+  "dataset" : "Default",
   "type"    : "search",
   "body"    : {
     "queries" : {
@@ -251,7 +251,7 @@ Elapsed time: 0.014714
 You will see something like below fluentd's log in `fluentd.log`:
 
 ~~~
-2014-02-17 15:20:37 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::InputMessage:0x007f8ae3e1dd98 @raw_message={"dataset"=>"Starbucks", "type"=>"search", "body"=>{"queries"=>{"stores"=>{"source"=>"Store", "condition"=>{"query"=>"Columbus", "matchTo"=>"_key"}, "output"=>{"elements"=>["startTime", "elapsedTime", "count", "attributes", "records"], "attributes"=>["_key"], "limit"=>-1}}}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64591/droonga"}, "id"=>"1392618037.935901", "date"=>"2014-02-17 15:20:37 +0900", "appliedAdapters"=>[]}>
+2014-02-17 15:20:37 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::InputMessage:0x007f8ae3e1dd98 @raw_message={"dataset"=>"Default", "type"=>"search", "body"=>{"queries"=>{"stores"=>{"source"=>"Store", "condition"=>{"query"=>"Columbus", "matchTo"=>"_key"}, "output"=>{"elements"=>["startTime", "elapsedTime", "count", "attributes", "records"], "attributes"=>["_key"], "limit"=>-1}}}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64591/droonga"}, "id"=>"1392618037.935901", "date"=>"2014-02-17 15:20:37 +0900", "appliedAdapters"=>[]}>
 ~~~
 
 This shows the message is received by our `SampleLoggerPlugin::Adapter` and then passed to Droonga. Here we can modify the message before the actual data processing.
@@ -316,7 +316,7 @@ Note that `count` is still `2` because `limit` does not affect to `count`. See [
 You will see something like below fluentd's log in `fluentd.log`:
 
 ~~~
-2014-02-17 15:24:39 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::InputMessage:0x007f956685c908 @raw_message={"dataset"=>"Starbucks", "type"=>"search", "body"=>{"queries"=>{"stores"=>{"source"=>"Store", "condition"=>{"query"=>"Columbus", "matchTo"=>"_key"}, "output"=>{"elements"=>["startTime", "elapsedTime", "count", "attributes", "records"], "attributes"=>["_key"], "limit"=>-1}}}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64616/droonga"}, "id"=>"1392618279.0578449", "date"=>"2014-02-17 15:24:39 +0900", "appliedAdapters"=>[]}>
+2014-02-17 15:24:39 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::InputMessage:0x007f956685c908 @raw_message={"dataset"=>"Default", "type"=>"search", "body"=>{"queries"=>{"stores"=>{"source"=>"Store", "condition"=>{"query"=>"Columbus", "matchTo"=>"_key"}, "output"=>{"elements"=>["startTime", "elapsedTime", "count", "attributes", "records"], "attributes"=>["_key"], "limit"=>-1}}}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64616/droonga"}, "id"=>"1392618279.0578449", "date"=>"2014-02-17 15:24:39 +0900", "appliedAdapters"=>[]}>
 ~~~
 
 
@@ -395,7 +395,7 @@ Elapsed time: 0.015491
 The fluentd's log should be like as follows:
 
 ~~~
-2014-02-17 15:41:09 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::OutputMessage:0x007fddcad4d5a0 @raw_message={"dataset"=>"Starbucks", "type"=>"dispatcher", "body"=>{"stores"=>{"count"=>2, "records"=>[["Columbus @ 67th - New York NY  (W)"], ["2 Columbus Ave. - New York NY  (W)"]]}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64724/droonga"}, "id"=>"1392619269.184789", "date"=>"2014-02-17 15:41:09 +0900", "appliedAdapters"=>["Droonga::Plugins::SampleLoggerPlugin::Adapter", "Droonga::Plugins::Error::Adapter"]}>
+2014-02-17 15:41:09 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::OutputMessage:0x007fddcad4d5a0 @raw_message={"dataset"=>"Default", "type"=>"dispatcher", "body"=>{"stores"=>{"count"=>2, "records"=>[["Columbus @ 67th - New York NY  (W)"], ["2 Columbus Ave. - New York NY  (W)"]]}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64724/droonga"}, "id"=>"1392619269.184789", "date"=>"2014-02-17 15:41:09 +0900", "appliedAdapters"=>["Droonga::Plugins::SampleLoggerPlugin::Adapter", "Droonga::Plugins::Error::Adapter"]}>
 ~~~
 
 This shows that the result of `search` is passed to the `adapt_output` method (and logged), then outputted.
@@ -462,7 +462,7 @@ Now you can see `completedAt` attribute containing the time completed the reques
 The results in `fluentd.log` will be like this:
 
 ~~~
-2014-02-17 15:45:28 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::OutputMessage:0x007fd384f3ab60 @raw_message={"dataset"=>"Starbucks", "type"=>"dispatcher", "body"=>{"stores"=>{"count"=>2, "records"=>[["Columbus @ 67th - New York NY  (W)"], ["2 Columbus Ave. - New York NY  (W)"]]}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64849/droonga"}, "id"=>"1392619528.235121", "date"=>"2014-02-17 15:45:28 +0900", "appliedAdapters"=>["Droonga::Plugins::SampleLoggerPlugin::Adapter", "Droonga::Plugins::Error::Adapter"]}>
+2014-02-17 15:45:28 +0900 [info]: SampleLoggerPlugin::Adapter message=#<Droonga::OutputMessage:0x007fd384f3ab60 @raw_message={"dataset"=>"Default", "type"=>"dispatcher", "body"=>{"stores"=>{"count"=>2, "records"=>[["Columbus @ 67th - New York NY  (W)"], ["2 Columbus Ave. - New York NY  (W)"]]}}, "replyTo"=>{"type"=>"search.result", "to"=>"127.0.0.1:64849/droonga"}, "id"=>"1392619528.235121", "date"=>"2014-02-17 15:45:28 +0900", "appliedAdapters"=>["Droonga::Plugins::SampleLoggerPlugin::Adapter", "Droonga::Plugins::Error::Adapter"]}>
 ~~~
 
 
@@ -542,7 +542,7 @@ catalog.json:
 ~~~
 (snip)
       "datasets": {
-        "Starbucks": {
+        "Default": {
           (snip)
           "plugins": ["store-search", "groonga", "crud", "search", "dump", "status"],
 (snip)
@@ -563,7 +563,7 @@ store-search-columbus.json:
 
 ~~~json
 {
-  "dataset" : "Starbucks",
+  "dataset" : "Default",
   "type"    : "storeSearch",
   "body"    : {
     "query" : "Columbus"
@@ -603,7 +603,7 @@ Elapsed time: 0.01494
 And you will see the result on fluentd's log in `fluentd.log`:
 
 ~~~
-2014-02-17 16:12:48 +0900 [info]: StoreSearchPlugin::Adapter message=#<Droonga::InputMessage:0x007fe4791d3958 @raw_message={"dataset"=>"Starbucks", "type"=>"storeSearch", "body"=>{"query"=>"Columbus"}, "replyTo"=>{"type"=>"storeSearch.result", "to"=>"127.0.0.1:49934/droonga"}, "id"=>"1392621168.0119512", "date"=>"2014-02-17 16:12:48 +0900", "appliedAdapters"=>[]}>
+2014-02-17 16:12:48 +0900 [info]: StoreSearchPlugin::Adapter message=#<Droonga::InputMessage:0x007fe4791d3958 @raw_message={"dataset"=>"Default", "type"=>"storeSearch", "body"=>{"query"=>"Columbus"}, "replyTo"=>{"type"=>"storeSearch.result", "to"=>"127.0.0.1:49934/droonga"}, "id"=>"1392621168.0119512", "date"=>"2014-02-17 16:12:48 +0900", "appliedAdapters"=>[]}>
 2014-02-17 16:12:48 +0900 [info]: storeSearch query="Columbus"
 ~~~
 
@@ -673,9 +673,9 @@ Elapsed time: 0.014859
 The log in `fluentd.log` will be like this:
 
 ~~~
-2014-02-17 16:14:48 +0900 [info]: StoreSearchPlugin::Adapter message=#<Droonga::InputMessage:0x007ffb8ada9d68 @raw_message={"dataset"=>"Starbucks", "type"=>"storeSearch", "body"=>{"query"=>"Columbus"}, "replyTo"=>{"type"=>"storeSearch.result", "to"=>"127.0.0.1:49960/droonga"}, "id"=>"1392621288.158763", "date"=>"2014-02-17 16:14:48 +0900", "appliedAdapters"=>[]}>
+2014-02-17 16:14:48 +0900 [info]: StoreSearchPlugin::Adapter message=#<Droonga::InputMessage:0x007ffb8ada9d68 @raw_message={"dataset"=>"Default", "type"=>"storeSearch", "body"=>{"query"=>"Columbus"}, "replyTo"=>{"type"=>"storeSearch.result", "to"=>"127.0.0.1:49960/droonga"}, "id"=>"1392621288.158763", "date"=>"2014-02-17 16:14:48 +0900", "appliedAdapters"=>[]}>
 2014-02-17 16:14:48 +0900 [info]: storeSearch query="Columbus"
-2014-02-17 16:14:48 +0900 [info]: StoreSearchPlugin::Adapter message=#<Droonga::OutputMessage:0x007ffb8ad78e48 @raw_message={"dataset"=>"Starbucks", "type"=>"dispatcher", "body"=>{"stores"=>{"count"=>2, "records"=>[["Columbus @ 67th - New York NY  (W)"], ["2 Columbus Ave. - New York NY  (W)"]]}}, "replyTo"=>{"type"=>"storeSearch.result", "to"=>"127.0.0.1:49960/droonga"}, "id"=>"1392621288.158763", "date"=>"2014-02-17 16:14:48 +0900", "appliedAdapters"=>["Droonga::Plugins::StoreSearchPlugin::Adapter", "Droonga::Plugins::Error::Adapter"], "originalTypes"=>["storeSearch"]}>
+2014-02-17 16:14:48 +0900 [info]: StoreSearchPlugin::Adapter message=#<Droonga::OutputMessage:0x007ffb8ad78e48 @raw_message={"dataset"=>"Default", "type"=>"dispatcher", "body"=>{"stores"=>{"count"=>2, "records"=>[["Columbus @ 67th - New York NY  (W)"], ["2 Columbus Ave. - New York NY  (W)"]]}}, "replyTo"=>{"type"=>"storeSearch.result", "to"=>"127.0.0.1:49960/droonga"}, "id"=>"1392621288.158763", "date"=>"2014-02-17 16:14:48 +0900", "appliedAdapters"=>["Droonga::Plugins::StoreSearchPlugin::Adapter", "Droonga::Plugins::Error::Adapter"], "originalTypes"=>["storeSearch"]}>
 ~~~
 
 Now you've got the simplified response.

  Modified: tutorial/1.1.2/plugin-development/handler/index.md (+5 -5)
===================================================================
--- tutorial/1.1.2/plugin-development/handler/index.md    2015-11-16 01:09:16 +0900 (b511704)
+++ tutorial/1.1.2/plugin-development/handler/index.md    2015-11-16 01:16:46 +0900 (8ae1d7a)
@@ -55,7 +55,7 @@ The request must have the name of one table, like:
 
 ~~~json
 {
-  "dataset" : "Starbucks",
+  "dataset" : "Default",
   "type"    : "countRecords",
   "body"    : {
     "table": "Store"
@@ -211,7 +211,7 @@ Add `"count-records"` to `"plugins"`.
 ~~~
 (snip)
       "datasets": {
-        "Starbucks": {
+        "Default": {
           (snip)
           "plugins": ["count-records", "groonga", "crud", "search", "dump", "status"],
 (snip)
@@ -255,7 +255,7 @@ Look at these points:
 
 There are three elements in the array. Why?
 
- * Remember that the `Starbucks` dataset was configured with two replicas and three sub volumes for each replica, in the `catalog.json` of [the basic tutorial][basic].
+ * Remember that the `Default` dataset was configured with two replicas and three sub volumes for each replica, in the `catalog.json` of [the basic tutorial][basic].
  * Because it is a read-only command, a request is delivered to only one replica (and it is chosen at random).
    Then only three single volumes receive the command, so only three results appear, not six.
    (TODO: I have to add a figure to indicate active nodes: [000, 001, 002, 010, 011, 012] => [000, 001, 002])
@@ -332,7 +332,7 @@ The request must have the condition to select records to be deleted, like:
 
 ~~~json
 {
-  "dataset" : "Starbucks",
+  "dataset" : "Default",
   "type"    : "deleteStores",
   "body"    : {
     "keyword": "Broadway"
@@ -469,7 +469,7 @@ Add `"delete-stores"` to `"plugins"`.
 ~~~
 (snip)
       "datasets": {
-        "Starbucks": {
+        "Default": {
           (snip)
           "plugins": ["delete-stores", "count-records", "groonga", "crud", "search", "dump", "status"],
 (snip)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index