[Groonga-commit] droonga/droonga.org at 863f1a5 [gh-pages] Add output example for droonga-request

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu May 7 11:12:55 JST 2015


YUKI Hiroshi	2015-05-07 11:12:55 +0900 (Thu, 07 May 2015)

  New Revision: 863f1a5e6d1d9f162371a2b257ec8bf9e2bba7c4
  https://github.com/droonga/droonga.org/commit/863f1a5e6d1d9f162371a2b257ec8bf9e2bba7c4

  Message:
    Add output example for droonga-request

  Modified files:
    _po/ja/reference/1.1.1/command-line-tools/droonga-request/index.po
    ja/reference/1.1.1/command-line-tools/droonga-request/index.md
    reference/1.1.1/command-line-tools/droonga-request/index.md

  Modified: _po/ja/reference/1.1.1/command-line-tools/droonga-request/index.po (+105 -4)
===================================================================
--- _po/ja/reference/1.1.1/command-line-tools/droonga-request/index.po    2015-05-07 11:05:29 +0900 (071f314)
+++ _po/ja/reference/1.1.1/command-line-tools/droonga-request/index.po    2015-05-07 11:12:55 +0900 (8aae069)
@@ -38,7 +38,29 @@ msgid ""
 "~~~\n"
 "(on 192.168.100.10)\n"
 "$ echo '{\"type\":\"system.status\"}' |\n"
-"    droonga-request --host 192.168.100.50 --receiver-host 192.168.100.10\n"
+"    droonga-request --report-request --host 192.168.100.50 --receiver-host 192"
+".168.100.10\n"
+"Request: {\n"
+"  \"type\": \"system.status\",\n"
+"  \"dataset\": \"Default\"\n"
+"}\n"
+"Elapsed time: 0.00900742\n"
+"{\n"
+"  \"inReplyTo\": \"1430963525.9829412\",\n"
+"  \"statusCode\": 200,\n"
+"  \"type\": \"system.status.result\",\n"
+"  \"body\": {\n"
+"    \"nodes\": {\n"
+"      \"node0:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      },\n"
+"      \"node1:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      }\n"
+"    },\n"
+"    \"reporter\": \"node0:55329/droonga @ node0:10031/droonga\"\n"
+"  }\n"
+"}\n"
 "~~~"
 msgstr ""
 
@@ -65,7 +87,8 @@ msgid ""
 "~~~\n"
 "(on 192.168.100.10)\n"
 "$ drndump --host 192.168.100.50 --receiver-host 192.168.100.10 | \\\n"
-"    droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10\n"
+"    droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 \\\n"
+"    > /dev/null\n"
 "~~~"
 msgstr ""
 
@@ -79,8 +102,29 @@ msgid ""
 "(on 192.168.100.10)\n"
 "$ cat /tmp/message\n"
 "{\"type\":\"system.status\"}\n"
-"$ droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/me"
-"ssage\n"
+"$ droonga-request --report-request --host 192.168.100.60 --receiver-host 192.1"
+"68.100.10 /tmp/message\n"
+"Request: {\n"
+"  \"type\": \"system.status\",\n"
+"  \"dataset\": \"Default\"\n"
+"}\n"
+"Elapsed time: 0.00900742\n"
+"{\n"
+"  \"inReplyTo\": \"1430963525.9829412\",\n"
+"  \"statusCode\": 200,\n"
+"  \"type\": \"system.status.result\",\n"
+"  \"body\": {\n"
+"    \"nodes\": {\n"
+"      \"node0:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      },\n"
+"      \"node1:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      }\n"
+"    },\n"
+"    \"reporter\": \"node0:55329/droonga @ node0:10031/droonga\"\n"
+"  }\n"
+"}\n"
 "~~~"
 msgstr ""
 
@@ -98,9 +142,40 @@ msgid ""
 "$ echo '{\"type\":\"system.status\"} {\"type\":\"system.statistics.object.count\",\"bod"
 "y\":{\"output\":[\"total\"]}}' |\n"
 "    droonga-request --host 192.168.100.50 --receiver-host 192.168.100.10\n"
+"Elapsed time: 0.007365724\n"
+"{\n"
+"  \"inReplyTo\": \"1430964599.844579\",\n"
+"  \"statusCode\": 200,\n"
+"  \"type\": \"system.status.result\",\n"
+"  \"body\": {\n"
+"    \"nodes\": {\n"
+"      \"node0:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      },\n"
+"      \"node1:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      }\n"
+"    },\n"
+"    \"reporter\": \"node0:55329/droonga @ node0:10031/droonga\"\n"
+"  }\n"
+"}\n"
+"Elapsed time: 0.014172429\n"
+"{\n"
+"  \"inReplyTo\": \"1430964599.8521488\",\n"
+"  \"statusCode\": 200,\n"
+"  \"type\": \"system.statistics.object.count.result\",\n"
+"  \"body\": {\n"
+"    \"total\": 549\n"
+"  }\n"
+"}\n"
 "~~~"
 msgstr ""
 
+msgid ""
+"All results with responses are printed to the standard output sequentially lik"
+"e above."
+msgstr ""
+
 msgid "Of course, you can include multiple messages to the source file like:"
 msgstr ""
 
@@ -113,6 +188,32 @@ msgid ""
 " \"body\":{\"output\":[\"total\"]}}\n"
 "$ droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/me"
 "ssages\n"
+"Elapsed time: 0.007365724\n"
+"{\n"
+"  \"inReplyTo\": \"1430964599.844579\",\n"
+"  \"statusCode\": 200,\n"
+"  \"type\": \"system.status.result\",\n"
+"  \"body\": {\n"
+"    \"nodes\": {\n"
+"      \"node0:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      },\n"
+"      \"node1:10031/droonga\": {\n"
+"        \"status\": \"active\"\n"
+"      }\n"
+"    },\n"
+"    \"reporter\": \"node0:55329/droonga @ node0:10031/droonga\"\n"
+"  }\n"
+"}\n"
+"Elapsed time: 0.014172429\n"
+"{\n"
+"  \"inReplyTo\": \"1430964599.8521488\",\n"
+"  \"statusCode\": 200,\n"
+"  \"type\": \"system.statistics.object.count.result\",\n"
+"  \"body\": {\n"
+"    \"total\": 549\n"
+"  }\n"
+"}\n"
 "~~~"
 msgstr ""
 

  Modified: ja/reference/1.1.1/command-line-tools/droonga-request/index.md (+100 -3)
===================================================================
--- ja/reference/1.1.1/command-line-tools/droonga-request/index.md    2015-05-07 11:05:29 +0900 (0230a19)
+++ ja/reference/1.1.1/command-line-tools/droonga-request/index.md    2015-05-07 11:12:55 +0900 (885d8bf)
@@ -24,7 +24,28 @@ For example, if there is a Droonga node `192.168.100.50` and you are logged in t
 ~~~
 (on 192.168.100.10)
 $ echo '{"type":"system.status"}' |
-    droonga-request --host 192.168.100.50 --receiver-host 192.168.100.10
+    droonga-request --report-request --host 192.168.100.50 --receiver-host 192.168.100.10
+Request: {
+  "type": "system.status",
+  "dataset": "Default"
+}
+Elapsed time: 0.00900742
+{
+  "inReplyTo": "1430963525.9829412",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
 ~~~
 
 For the complete list of available commands, see also [the command reference](../../commands/).
@@ -40,7 +61,8 @@ For example, you'll be able to use [`drndump`](../drndump/)'s output as the sour
 ~~~
 (on 192.168.100.10)
 $ drndump --host 192.168.100.50 --receiver-host 192.168.100.10 | \
-    droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10
+    droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 \
+    > /dev/null
 ~~~
 
 Another case, you can use a text file as the source.
@@ -50,7 +72,28 @@ This command reads the file specified as an command line argument, like:
 (on 192.168.100.10)
 $ cat /tmp/message
 {"type":"system.status"}
-$ droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/message
+$ droonga-request --report-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/message
+Request: {
+  "type": "system.status",
+  "dataset": "Default"
+}
+Elapsed time: 0.00900742
+{
+  "inReplyTo": "1430963525.9829412",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
 ~~~
 
 ### Sending multiple messages at once
@@ -62,8 +105,36 @@ To do it, you simply give multiple messages as the input, like:
 (on 192.168.100.10)
 $ echo '{"type":"system.status"} {"type":"system.statistics.object.count","body":{"output":["total"]}}' |
     droonga-request --host 192.168.100.50 --receiver-host 192.168.100.10
+Elapsed time: 0.007365724
+{
+  "inReplyTo": "1430964599.844579",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
+Elapsed time: 0.014172429
+{
+  "inReplyTo": "1430964599.8521488",
+  "statusCode": 200,
+  "type": "system.statistics.object.count.result",
+  "body": {
+    "total": 549
+  }
+}
 ~~~
 
+All results with responses are printed to the standard output sequentially like above.
+
 Of course, you can include multiple messages to the source file like:
 
 ~~~
@@ -73,6 +144,32 @@ $ cat /tmp/messages
 {"type":"system.statistics.object.count",
  "body":{"output":["total"]}}
 $ droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/messages
+Elapsed time: 0.007365724
+{
+  "inReplyTo": "1430964599.844579",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
+Elapsed time: 0.014172429
+{
+  "inReplyTo": "1430964599.8521488",
+  "statusCode": 200,
+  "type": "system.statistics.object.count.result",
+  "body": {
+    "total": 549
+  }
+}
 ~~~
 
 

  Modified: reference/1.1.1/command-line-tools/droonga-request/index.md (+100 -3)
===================================================================
--- reference/1.1.1/command-line-tools/droonga-request/index.md    2015-05-07 11:05:29 +0900 (7c56aa2)
+++ reference/1.1.1/command-line-tools/droonga-request/index.md    2015-05-07 11:12:55 +0900 (b9ef893)
@@ -15,7 +15,28 @@ For example, if there is a Droonga node `192.168.100.50` and you are logged in t
 ~~~
 (on 192.168.100.10)
 $ echo '{"type":"system.status"}' |
-    droonga-request --host 192.168.100.50 --receiver-host 192.168.100.10
+    droonga-request --report-request --host 192.168.100.50 --receiver-host 192.168.100.10
+Request: {
+  "type": "system.status",
+  "dataset": "Default"
+}
+Elapsed time: 0.00900742
+{
+  "inReplyTo": "1430963525.9829412",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
 ~~~
 
 For the complete list of available commands, see also [the command reference](../../commands/).
@@ -31,7 +52,8 @@ For example, you'll be able to use [`drndump`](../drndump/)'s output as the sour
 ~~~
 (on 192.168.100.10)
 $ drndump --host 192.168.100.50 --receiver-host 192.168.100.10 | \
-    droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10
+    droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 \
+    > /dev/null
 ~~~
 
 Another case, you can use a text file as the source.
@@ -41,7 +63,28 @@ This command reads the file specified as an command line argument, like:
 (on 192.168.100.10)
 $ cat /tmp/message
 {"type":"system.status"}
-$ droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/message
+$ droonga-request --report-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/message
+Request: {
+  "type": "system.status",
+  "dataset": "Default"
+}
+Elapsed time: 0.00900742
+{
+  "inReplyTo": "1430963525.9829412",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
 ~~~
 
 ### Sending multiple messages at once
@@ -53,8 +96,36 @@ To do it, you simply give multiple messages as the input, like:
 (on 192.168.100.10)
 $ echo '{"type":"system.status"} {"type":"system.statistics.object.count","body":{"output":["total"]}}' |
     droonga-request --host 192.168.100.50 --receiver-host 192.168.100.10
+Elapsed time: 0.007365724
+{
+  "inReplyTo": "1430964599.844579",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
+Elapsed time: 0.014172429
+{
+  "inReplyTo": "1430964599.8521488",
+  "statusCode": 200,
+  "type": "system.statistics.object.count.result",
+  "body": {
+    "total": 549
+  }
+}
 ~~~
 
+All results with responses are printed to the standard output sequentially like above.
+
 Of course, you can include multiple messages to the source file like:
 
 ~~~
@@ -64,6 +135,32 @@ $ cat /tmp/messages
 {"type":"system.statistics.object.count",
  "body":{"output":["total"]}}
 $ droonga-request --host 192.168.100.60 --receiver-host 192.168.100.10 /tmp/messages
+Elapsed time: 0.007365724
+{
+  "inReplyTo": "1430964599.844579",
+  "statusCode": 200,
+  "type": "system.status.result",
+  "body": {
+    "nodes": {
+      "node0:10031/droonga": {
+        "status": "active"
+      },
+      "node1:10031/droonga": {
+        "status": "active"
+      }
+    },
+    "reporter": "node0:55329/droonga @ node0:10031/droonga"
+  }
+}
+Elapsed time: 0.014172429
+{
+  "inReplyTo": "1430964599.8521488",
+  "statusCode": 200,
+  "type": "system.statistics.object.count.result",
+  "body": {
+    "total": 549
+  }
+}
 ~~~
 
 
-------------- next part --------------
HTML����������������������������...
다운로드 



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