YUKI Hiroshi
null+****@clear*****
Thu Apr 23 11:44:51 JST 2015
YUKI Hiroshi 2015-04-23 11:44:51 +0900 (Thu, 23 Apr 2015) New Revision: ef4f44a3e718332a38e5ed94cb4ece67e346d44e https://github.com/droonga/droonga.org/commit/ef4f44a3e718332a38e5ed94cb4ece67e346d44e Message: Add reference for system.statistics.object.count Added files: reference/1.1.0/commands/system/statistics/object/count/index.md Modified files: reference/1.1.0/commands/system/index.md Modified: reference/1.1.0/commands/system/index.md (+3 -0) =================================================================== --- reference/1.1.0/commands/system/index.md 2015-04-21 17:43:54 +0900 (b2b46f3) +++ reference/1.1.0/commands/system/index.md 2015-04-23 11:44:51 +0900 (c09e7a5) @@ -6,4 +6,7 @@ layout: en `system` is a namespace for commands to report system information of the cluster. * [system.status](status/): Reports status information of the cluster + * system.statistics + * system.statistics.object + * [system.statistics.object.count](statistics/object/count): Counts and reports numbers of physical objects in the dataset Added: reference/1.1.0/commands/system/statistics/object/count/index.md (+149 -0) 100644 =================================================================== --- /dev/null +++ reference/1.1.0/commands/system/statistics/object/count/index.md 2015-04-23 11:44:51 +0900 (4fefcc2) @@ -0,0 +1,149 @@ +--- +title: system.statistics.object.count +layout: en +--- + +* TOC +{:toc} + +## Abstract {#abstract} + +The `system.statistics.object.count` command counts and reports numbers of physical objects in the dataset. + +## API types {#api-types} + +### HTTP {#api-types-http} + +Request endpoint +: `(Document Root)/droonga/system/statistics/object/count` + +Request methd +: `GET` + +Request URL parameters +: See [parameters](#parameters). + +Request body +: Nothing. + +Response body +: A [response message](#response). + +### REST {#api-types-rest} + +Not supported. + +### Fluentd {#api-types-fluentd} + +Style +: Request-Response. One response message is always returned per one request. + +`type` of the request +: `system.statistics.object.count` + +`body` of the request +: A hash of [parameters](#parameters). + +`type` of the response +: `system.statistics.object.count.result` + +## Parameter syntax {#syntax} + + { + "output": [ + "tables", + "columns", + "records" + ] + } + +or + + { + "output": [ + "total" + ] + } + +## Parameter details {#parameters} + +All parameters are optional. + +### `output` {#parameter-output} + +Abstract +: Targets to be reported their count. + +Value +: An array. Values are target names. Possible values are: + + * `tables` + * `columns` + * `records` + * `total` + +Default value +: `[]` + +## Usage {#usage} + +This command counts and reports the physical numbers of specified targets. +For example: + + { + "type" : "system.statistics.object.count", + "body" : { + "output": [ + "tables", + "columns", + "records", + "total" + ] + } + } + + => { + "type" : "system.statistics.object.count.result", + "body" : { + "tables": 2, + "columns": 0, + "records": 1, + "total": 3 + } + } + + +## Responses {#response} + +This returns a hash like following as the response's `body`, with `200` as its `statusCode`. + + { + "tables": <The total number of tables>, + "columns": <The total number of columns>, + "records": <The total number of records>, + "total": <The total number of all objects>, + } + +`tables` +: The number of physical tables in the dataset. + If there are multiple slices, the number of tables is also multiplied. + For example, if there are two slices and you defined two tables, then this reports `4`. + +`columns` +: The number of physical columns in the dataset. + If there are multiple slices, the number of columns is also multiplied. + For example, if there are two slices and you defined two tables with two columns for each, then this reports `8`. + +`records` +: The number of physical records in the dataset. + If there are multiple slices, the number of records in fact tables is also multiplied. + For example, if there are two slices and you added one record for a regular table amd one record for a fact table, then this reports `3`. + (One for the regular table, two for multiplied records in the fact table.) + +`total` +: The total number of `tables`, `columns`, and `records`. + If you just want to know the total number of all objects, this is faster than separate targets. + +## Error types {#errors} + +This command reports [general errors](/reference/message/#error). -------------- next part -------------- HTML����������������������������...Download