droonga-groonga
provides ability to communicate a Droonga cluster like a Groonga server, via the command line interface.
For example, if there is a Droonga Engine node 192.168.100.50
and you are logged in to a computer 192.168.100.10
in the same network segment, the command line to list all tables is:
(on 192.168.100.10)
$ droonga-groonga --host 192.168.100.50 --receiver-host 192.168.100.10 --pretty \
table_list
[
[
0,
1431000097.1314175,
0.00024175643920898438
],
[
[
[
"id",
"UInt32"
],
[
"name",
"ShortText"
...
]
]
This command is just a shorthand of droonga-request
with a message of Groonga compatible commands.
The result produced by the following command line almost equals to the one of above:
(on 192.168.100.10)
$ echo '{"type":"table_list"}' |
droonga-request --report-request --host 192.168.100.50 --receiver-host 192.168.100.10
Request: {
"type": "table_list",
"id": "1431000097.1242323",
"date": "2015-05-07T12:01:37.124254Z",
"dataset": "Default"
}
Elapsed time: 0.011710191
{
"inReplyTo": "1431000097.1242323",
"statusCode": 200,
"type": "table_list.result",
"body": [
[
0,
1431000097.1314175,
0.00024175643920898438
],
[
[
[
"id",
"UInt32"
],
[
"name",
"ShortText"
...
]
]
}
See also references of Groonga compatible command and Groonga’s reference manual.
groonga
commandThis command is designed to work like “client mode” and “standalone mode” of the groonga
command.
All command line arguments given to this command except Droonga specific options will work like command line arguments for the groonga
command.
For example:
(on 192.168.100.10)
$ GROONGA="droonga-groonga --host 192.168.100.50 --receiver-host 192.168.100.10 --pretty "
$ $GROONGA table_list
$ $GROONGA column_list --table Store
$ $GROONGA select --table Store --match_columns name --query ave --limit 5 --output_columns _key,name
However, currently these features of the groonga
command are not supported yet:
load
command with values given as separate lines following to main command line arguments.Groonga like command line arguments and following Droonga specific options are available.
--pretty
--host=NAME
--port=PORT
10031
by default.--tag=TAG
droonga
by default.--dataset=NAME
Default
by default.--receiver-host=NAME
--target-role=ROLE
service-provider
:
The message is processed by service provider nodes in the cluster.
For absorb-source nodes and absrob-destination nodes, the message will be dispatched later.absorb-source
:
The message is processed by absorb-source nodes in the cluster.
For service provider nodes and absrob-destination nodes, the message is never dispatched.absorb-destination
:
The message is processed by absorb-destination nodes in the cluster.
For service provider nodes and absrob-source nodes, the message is never dispatched.any
:
The message is always processed by the node specified via the option --host
.any
by default.
--timeout=SECONDS
3
by default.-h
, --help
This is installed as a part of a rubygems package droonga-client
.
# gem install droonga-client