Kouhei Sutou
null+****@clear*****
Fri Aug 14 17:42:36 JST 2015
Kouhei Sutou 2015-08-14 17:42:36 +0900 (Fri, 14 Aug 2015) New Revision: 784ed187dea2e67c4d20b750301b1676f48daeb5 https://github.com/groonga/groonga/commit/784ed187dea2e67c4d20b750301b1676f48daeb5 Message: doc: document logical_shard_list Added files: doc/source/example/reference/commands/logical_shard_list/logical_table.log doc/source/example/reference/commands/logical_shard_list/usage_list.log doc/source/example/reference/commands/logical_shard_list/usage_register.log doc/source/example/reference/commands/logical_shard_list/usage_shards.log doc/source/reference/commands/logical_shard_list.rst Added: doc/source/example/reference/commands/logical_shard_list/logical_table.log (+21 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_shard_list/logical_table.log 2015-08-14 17:42:36 +0900 (d8c60a8) @@ -0,0 +1,21 @@ +Execution example:: + + logical_shard_list --logical_table Logs + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # { + # "name": "Logs_20150801" + # }, + # { + # "name": "Logs_20150802" + # }, + # { + # "name": "Logs_20150930" + # } + # ] + # ] Added: doc/source/example/reference/commands/logical_shard_list/usage_list.log (+21 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_shard_list/usage_list.log 2015-08-14 17:42:36 +0900 (d8c60a8) @@ -0,0 +1,21 @@ +Execution example:: + + logical_shard_list --logical_table Logs + # [ + # [ + # 0, + # 1337566253.89858, + # 0.000355720520019531 + # ], + # [ + # { + # "name": "Logs_20150801" + # }, + # { + # "name": "Logs_20150802" + # }, + # { + # "name": "Logs_20150930" + # } + # ] + # ] Added: doc/source/example/reference/commands/logical_shard_list/usage_register.log (+4 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_shard_list/usage_register.log 2015-08-14 17:42:36 +0900 (6315f95) @@ -0,0 +1,4 @@ +Execution example:: + + plugin_register sharding + # [[0, 1337566253.89858, 0.000355720520019531], true] Added: doc/source/example/reference/commands/logical_shard_list/usage_shards.log (+14 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/logical_shard_list/usage_shards.log 2015-08-14 17:42:36 +0900 (71c7d43) @@ -0,0 +1,14 @@ +Execution example:: + + table_create Logs_20150801 TABLE_HASH_KEY ShortText + # [[0, 1337566253.89858, 0.000355720520019531], true] + column_create Logs_20150801 timestamp COLUMN_SCALAR Time + # [[0, 1337566253.89858, 0.000355720520019531], true] + table_create Logs_20150802 TABLE_HASH_KEY ShortText + # [[0, 1337566253.89858, 0.000355720520019531], true] + column_create Logs_20150802 timestamp COLUMN_SCALAR Time + # [[0, 1337566253.89858, 0.000355720520019531], true] + table_create Logs_20150930 TABLE_HASH_KEY ShortText + # [[0, 1337566253.89858, 0.000355720520019531], true] + column_create Logs_20150930 timestamp COLUMN_SCALAR Time + # [[0, 1337566253.89858, 0.000355720520019531], true] Added: doc/source/reference/commands/logical_shard_list.rst (+108 -0) 100644 =================================================================== --- /dev/null +++ doc/source/reference/commands/logical_shard_list.rst 2015-08-14 17:42:36 +0900 (e21c697) @@ -0,0 +1,108 @@ +.. -*- rst -*- + +.. highlightlang:: none + +.. groonga-command +.. database: commands_logical_shard_list + +``logical_shard_list`` +====================== + +Summary +------- + +.. note:: + + This command is an experimental feature. + +.. versionadded:: 5.0.7 + +``logical_shard_list`` returns all existing shard names against the +specified logical table name. + +Syntax +------ + +``logical_shard_list`` has only one required parameter:: + + logical_shard_list logical_table + +Usage +----- + +You need to register ``sharding`` plugin to use ``logical_parameters`` +command: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_shard_list/usage_register.log +.. plugin_register sharding + +Here are sample shards: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_shard_list/usage_shards.log +.. table_create Logs_20150801 TABLE_HASH_KEY ShortText +.. column_create Logs_20150801 timestamp COLUMN_SCALAR Time +.. table_create Logs_20150802 TABLE_HASH_KEY ShortText +.. column_create Logs_20150802 timestamp COLUMN_SCALAR Time +.. table_create Logs_20150930 TABLE_HASH_KEY ShortText +.. column_create Logs_20150930 timestamp COLUMN_SCALAR Time + +You can get the all shard names in ascending order by specifying +``Logs`` as the logical table name: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_shard_list/usage_list.log +.. logical_shard_list --logical_table Logs + + +Parameters +---------- + +This section describes parameters of ``logical_shard_list``. + +Required parameters +^^^^^^^^^^^^^^^^^^^ + +There is one required parameter. + +.. _logical-shard-logical-table: + +``logical_table`` +""""""""""""""""" + +Specifies the logical table name. ``logical_shard_list`` returns a +list of shard name of the logical table: + +.. groonga-command +.. include:: ../../example/reference/commands/logical_shard_list/logical_table.log +.. logical_shard_list --logical_table Logs + +The list is sorted by shard name in ascending order. + +Optional shard_list +^^^^^^^^^^^^^^^^^^^ + +There is no optional parameters. + +Return value +------------ + +The command returns a list of shard names in ascending order:: + + [ + HEADER, + [ + {"name": "SHARD_NAME_1"}, + {"name": "SHARD_NAME_2"}, + ... + {"name": "SHARD_NAME_N"} + ] + ] + +See :doc:`/reference/command/output_format` for ``HEADER``. + +See also +-------- + + * :doc:`/reference/sharding` -------------- next part -------------- HTML����������������������������... Download