droonga-engine 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +3 -2
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/Rakefile +1 -1
- data/benchmark/benchmark.rb +1 -1
- data/benchmark/utils.rb +1 -1
- data/benchmark/watch/benchmark-notify.rb +1 -1
- data/benchmark/watch/benchmark-publish.rb +1 -1
- data/benchmark/watch/benchmark-scan.rb +1 -1
- data/bin/droonga-engine +1 -1
- data/bin/droonga-engine-absorb-data +48 -8
- data/bin/droonga-engine-catalog-generate +1 -1
- data/bin/droonga-engine-catalog-modify +1 -1
- data/bin/droonga-engine-data-publisher +66 -0
- data/bin/droonga-engine-join +72 -17
- data/bin/droonga-engine-serf-event-handler +1 -1
- data/bin/droonga-engine-service +1 -1
- data/bin/droonga-engine-unjoin +11 -4
- data/bin/droonga-engine-worker +20 -0
- data/doc/text/news.md +8 -0
- data/droonga-engine.gemspec +3 -3
- data/lib/droonga/adapter.rb +1 -1
- data/lib/droonga/adapter_runner.rb +1 -1
- data/lib/droonga/address.rb +69 -0
- data/lib/droonga/buffered_tcp_socket.rb +44 -22
- data/lib/droonga/catalog/base.rb +1 -1
- data/lib/droonga/catalog/collection_volume.rb +1 -1
- data/lib/droonga/catalog/dataset.rb +8 -8
- data/lib/droonga/catalog/errors.rb +1 -1
- data/lib/droonga/catalog/schema.rb +1 -1
- data/lib/droonga/catalog/single_volume.rb +6 -8
- data/lib/droonga/catalog/slice.rb +1 -1
- data/lib/droonga/catalog/version1.rb +2 -2
- data/lib/droonga/catalog/version2.rb +6 -6
- data/lib/droonga/catalog/version2_validator.rb +1 -1
- data/lib/droonga/catalog/volume.rb +1 -1
- data/lib/droonga/catalog/volume_collection.rb +2 -2
- data/lib/droonga/catalog_generator.rb +49 -53
- data/lib/droonga/catalog_loader.rb +1 -1
- data/lib/droonga/collector.rb +1 -1
- data/lib/droonga/collector_message.rb +1 -1
- data/lib/droonga/collector_runner.rb +1 -1
- data/lib/droonga/collectors/and.rb +1 -1
- data/lib/droonga/collectors/or.rb +1 -1
- data/lib/droonga/collectors/sum.rb +1 -1
- data/lib/droonga/collectors.rb +1 -1
- data/lib/droonga/command/droonga_engine.rb +103 -55
- data/lib/droonga/command/droonga_engine_service.rb +22 -67
- data/lib/droonga/command/droonga_engine_worker.rb +232 -0
- data/lib/droonga/command/serf_event_handler.rb +126 -46
- data/lib/droonga/data_absorber.rb +32 -14
- data/lib/droonga/dispatcher.rb +15 -11
- data/lib/droonga/distributed_command_planner.rb +1 -1
- data/lib/droonga/distributor.rb +1 -1
- data/lib/droonga/engine/version.rb +2 -2
- data/lib/droonga/engine.rb +8 -3
- data/lib/droonga/engine_state.rb +15 -6
- data/lib/droonga/error.rb +1 -1
- data/lib/droonga/error_messages.rb +1 -1
- data/lib/droonga/event_loop.rb +1 -1
- data/lib/droonga/farm.rb +9 -1
- data/lib/droonga/file_observer.rb +1 -1
- data/lib/droonga/fluent_message_receiver.rb +11 -5
- data/lib/droonga/fluent_message_sender.rb +14 -17
- data/lib/droonga/forwarder.rb +23 -13
- data/lib/droonga/handler.rb +1 -1
- data/lib/droonga/handler_message.rb +1 -1
- data/lib/droonga/handler_messenger.rb +2 -2
- data/lib/droonga/handler_runner.rb +2 -2
- data/lib/droonga/input_message.rb +1 -1
- data/lib/droonga/internal_fluent_message_receiver.rb +3 -2
- data/lib/droonga/job_protocol.rb +1 -1
- data/lib/droonga/job_pusher.rb +1 -1
- data/lib/droonga/job_receiver.rb +1 -1
- data/lib/droonga/line_buffer.rb +1 -1
- data/lib/droonga/live_nodes_list_loader.rb +1 -1
- data/lib/droonga/loggable.rb +1 -1
- data/lib/droonga/logger.rb +3 -3
- data/lib/droonga/message_matcher.rb +1 -1
- data/lib/droonga/output_message.rb +1 -1
- data/lib/droonga/path.rb +5 -1
- data/lib/droonga/planner.rb +1 -1
- data/lib/droonga/pluggable.rb +1 -1
- data/lib/droonga/plugin/metadata/adapter_input_message.rb +1 -1
- data/lib/droonga/plugin/metadata/adapter_output_message.rb +1 -1
- data/lib/droonga/plugin/metadata/collector_message.rb +1 -1
- data/lib/droonga/plugin/metadata/handler_action.rb +1 -1
- data/lib/droonga/plugin/metadata/input_message.rb +1 -1
- data/lib/droonga/plugin.rb +2 -1
- data/lib/droonga/plugin_loader.rb +1 -1
- data/lib/droonga/plugin_registry.rb +3 -1
- data/lib/droonga/plugins/basic.rb +1 -1
- data/lib/droonga/plugins/crud.rb +1 -1
- data/lib/droonga/plugins/dump.rb +13 -2
- data/lib/droonga/plugins/error.rb +1 -1
- data/lib/droonga/plugins/groonga/column_create.rb +1 -1
- data/lib/droonga/plugins/groonga/column_list.rb +1 -1
- data/lib/droonga/plugins/groonga/column_remove.rb +1 -1
- data/lib/droonga/plugins/groonga/column_rename.rb +1 -1
- data/lib/droonga/plugins/groonga/delete.rb +1 -1
- data/lib/droonga/plugins/groonga/generic_command.rb +1 -1
- data/lib/droonga/plugins/groonga/generic_response.rb +1 -1
- data/lib/droonga/plugins/groonga/select.rb +1 -1
- data/lib/droonga/plugins/groonga/table_create.rb +1 -1
- data/lib/droonga/plugins/groonga/table_list.rb +1 -1
- data/lib/droonga/plugins/groonga/table_remove.rb +1 -1
- data/lib/droonga/plugins/groonga.rb +1 -1
- data/lib/droonga/plugins/search/distributed_search_planner.rb +1 -1
- data/lib/droonga/plugins/search.rb +1 -1
- data/lib/droonga/plugins/system.rb +1 -1
- data/lib/droonga/plugins/watch.rb +1 -1
- data/lib/droonga/{service_control_protocol.rb → process_control_protocol.rb} +2 -2
- data/lib/droonga/process_supervisor.rb +91 -0
- data/lib/droonga/processor.rb +1 -1
- data/lib/droonga/reducer.rb +1 -1
- data/lib/droonga/replier.rb +2 -2
- data/lib/droonga/safe_file_writer.rb +1 -1
- data/lib/droonga/schema_applier.rb +1 -1
- data/lib/droonga/searcher/mecab_filter.rb +1 -1
- data/lib/droonga/searcher.rb +31 -19
- data/lib/droonga/serf.rb +81 -14
- data/lib/droonga/serf_downloader.rb +2 -2
- data/lib/droonga/session.rb +1 -1
- data/lib/droonga/single_step.rb +1 -1
- data/lib/droonga/single_step_definition.rb +1 -1
- data/lib/droonga/slice.rb +30 -28
- data/lib/droonga/status_code.rb +1 -1
- data/lib/droonga/step_runner.rb +1 -1
- data/lib/droonga/supervisor.rb +170 -0
- data/lib/droonga/sweeper.rb +1 -1
- data/lib/droonga/test/stub_handler.rb +1 -1
- data/lib/droonga/test/stub_handler_message.rb +1 -1
- data/lib/droonga/test/stub_handler_messenger.rb +1 -1
- data/lib/droonga/test/stub_planner.rb +1 -1
- data/lib/droonga/test.rb +1 -1
- data/lib/droonga/watch_schema.rb +2 -2
- data/lib/droonga/watcher.rb +1 -1
- data/lib/droonga/worker_process_agent.rb +111 -0
- data/sample/cluster/Rakefile +150 -0
- data/test/command/config/default/catalog.json +1 -34
- data/test/command/config/version1/catalog.json +3 -12
- data/test/command/run-test.rb +1 -1
- data/test/command/suite/dump/column/index.expected +19 -82
- data/test/command/suite/dump/column/scalar.expected +5 -36
- data/test/command/suite/dump/column/vector.expected +5 -39
- data/test/command/suite/dump/record/vector/reference.expected +24 -93
- data/test/command/suite/dump/table/array.expected +0 -19
- data/test/command/suite/dump/table/double_array_trie.expected +0 -20
- data/test/command/suite/dump/table/hash.expected +0 -20
- data/test/command/suite/dump/table/patricia_trie.expected +0 -20
- data/test/command/suite/search/condition/query/nonexistent_column.expected +0 -11
- data/test/command/suite/search/condition/query/syntax_error.expected +0 -11
- data/test/command/suite/search/error/unknown-source.expected +0 -12
- data/test/command/suite/search/output/attributes/invalid.expected +0 -10
- data/test/command/suite/search/output/attributes/reference_vector.catalog.json +27 -0
- data/test/command/suite/search/output/attributes/reference_vector.expected +30 -0
- data/test/command/suite/search/output/attributes/reference_vector.test +32 -0
- data/test/command/suite/watch/subscribe.catalog.json +23 -0
- data/test/command/suite/watch/subscribe.test +2 -0
- data/test/command/suite/watch/unsubscribe.catalog.json +23 -0
- data/test/command/suite/watch/unsubscribe.test +2 -0
- data/test/performance/run-test.rb +1 -1
- data/test/unit/catalog/test_collection_volume.rb +1 -1
- data/test/unit/catalog/test_dataset.rb +1 -1
- data/test/unit/catalog/test_schema.rb +1 -1
- data/test/unit/catalog/test_single_volume.rb +27 -19
- data/test/unit/catalog/test_slice.rb +2 -2
- data/test/unit/catalog/test_version1.rb +1 -1
- data/test/unit/catalog/test_version2.rb +1 -1
- data/test/unit/catalog/test_version2_validator.rb +1 -1
- data/test/unit/catalog/test_volume_collection.rb +1 -1
- data/test/unit/helper/distributed_search_planner_helper.rb +1 -1
- data/test/unit/helper/fixture.rb +1 -1
- data/test/unit/helper/plugin_helper.rb +1 -1
- data/test/unit/helper/sandbox.rb +1 -1
- data/test/unit/helper/stub_worker.rb +1 -1
- data/test/unit/helper/watch_helper.rb +1 -1
- data/test/unit/helper.rb +1 -1
- data/test/unit/plugins/crud/test_add.rb +1 -1
- data/test/unit/plugins/groonga/select/test_adapter_input.rb +1 -1
- data/test/unit/plugins/groonga/select/test_adapter_output.rb +1 -1
- data/test/unit/plugins/groonga/test_column_create.rb +1 -1
- data/test/unit/plugins/groonga/test_column_list.rb +1 -1
- data/test/unit/plugins/groonga/test_column_remove.rb +1 -1
- data/test/unit/plugins/groonga/test_column_rename.rb +1 -1
- data/test/unit/plugins/groonga/test_delete.rb +1 -1
- data/test/unit/plugins/groonga/test_table_create.rb +1 -1
- data/test/unit/plugins/groonga/test_table_list.rb +1 -1
- data/test/unit/plugins/groonga/test_table_remove.rb +1 -1
- data/test/unit/plugins/search/planner/test_basic.rb +1 -1
- data/test/unit/plugins/search/planner/test_group_by.rb +1 -1
- data/test/unit/plugins/search/planner/test_output.rb +1 -1
- data/test/unit/plugins/search/planner/test_sort_by.rb +1 -1
- data/test/unit/plugins/search/test_collector.rb +1 -1
- data/test/unit/plugins/search/test_handler.rb +1 -1
- data/test/unit/plugins/search/test_planner.rb +1 -1
- data/test/unit/plugins/system/test_status.rb +1 -1
- data/test/unit/plugins/test_basic.rb +1 -1
- data/test/unit/plugins/test_groonga.rb +1 -1
- data/test/unit/plugins/test_watch.rb +1 -1
- data/test/unit/run-test.rb +1 -1
- data/test/unit/test_address.rb +53 -0
- data/test/unit/test_catalog_generator.rb +59 -1
- data/test/unit/test_line_buffer.rb +1 -1
- data/test/unit/test_message_matcher.rb +1 -1
- data/test/unit/test_schema_applier.rb +1 -1
- data/test/unit/test_sweeper.rb +1 -1
- data/test/unit/test_watch_schema.rb +1 -1
- data/test/unit/test_watcher.rb +1 -1
- metadata +39 -24
- data/lib/droonga/server.rb +0 -45
- data/lib/droonga/worker.rb +0 -66
- data/sample/cluster/catalog.json +0 -42
- data/test/command/config/default/fluentd.conf +0 -11
- data/test/command/config/version1/fluentd.conf +0 -11
|
@@ -8,11 +8,6 @@
|
|
|
8
8
|
"dataset": "Default",
|
|
9
9
|
"type": "dump.start"
|
|
10
10
|
}
|
|
11
|
-
{
|
|
12
|
-
"inReplyTo": "request-id",
|
|
13
|
-
"dataset": "Default",
|
|
14
|
-
"type": "dump.start"
|
|
15
|
-
}
|
|
16
11
|
{
|
|
17
12
|
"inReplyTo": "request-id",
|
|
18
13
|
"statusCode": 200,
|
|
@@ -29,11 +24,6 @@
|
|
|
29
24
|
},
|
|
30
25
|
"type": "dump.table"
|
|
31
26
|
}
|
|
32
|
-
{
|
|
33
|
-
"inReplyTo": "request-id",
|
|
34
|
-
"dataset": "Default",
|
|
35
|
-
"type": "dump.end"
|
|
36
|
-
}
|
|
37
27
|
{
|
|
38
28
|
"inReplyTo": "request-id",
|
|
39
29
|
"dataset": "Default",
|
|
@@ -49,16 +39,6 @@
|
|
|
49
39
|
"dataset": "Default",
|
|
50
40
|
"type": "dump.end"
|
|
51
41
|
}
|
|
52
|
-
{
|
|
53
|
-
"inReplyTo": "request-id",
|
|
54
|
-
"dataset": "Default",
|
|
55
|
-
"body": {
|
|
56
|
-
"type": "PatriciaTrie",
|
|
57
|
-
"name": "Memos",
|
|
58
|
-
"keyType": "ShortText"
|
|
59
|
-
},
|
|
60
|
-
"type": "dump.table"
|
|
61
|
-
}
|
|
62
42
|
{
|
|
63
43
|
"inReplyTo": "request-id",
|
|
64
44
|
"dataset": "Default",
|
|
@@ -32,17 +32,6 @@
|
|
|
32
32
|
"input": "nonexistent:Droonga"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
"sources2": {
|
|
37
|
-
"statusCode": 400,
|
|
38
|
-
"body": {
|
|
39
|
-
"name": "SyntaxError",
|
|
40
|
-
"message": "Syntax error: syntax:<query> input:<nonexistent:Droonga>",
|
|
41
|
-
"detail": {
|
|
42
|
-
"syntax": "query",
|
|
43
|
-
"input": "nonexistent:Droonga"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
35
|
}
|
|
47
36
|
}
|
|
48
37
|
}
|
|
@@ -32,17 +32,6 @@
|
|
|
32
32
|
"input": "("
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
"sources2": {
|
|
37
|
-
"statusCode": 400,
|
|
38
|
-
"body": {
|
|
39
|
-
"name": "SyntaxError",
|
|
40
|
-
"message": "Syntax error: syntax:<query> input:<(>",
|
|
41
|
-
"detail": {
|
|
42
|
-
"syntax": "query",
|
|
43
|
-
"input": "("
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
35
|
}
|
|
47
36
|
}
|
|
48
37
|
}
|
|
@@ -35,18 +35,6 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
"sources2": {
|
|
40
|
-
"statusCode": 404,
|
|
41
|
-
"body": {
|
|
42
|
-
"name": "UnknownSource",
|
|
43
|
-
"message": "Source not found: <unknown> It must be a name of an existing table or another query.",
|
|
44
|
-
"detail": {
|
|
45
|
-
"unknown-source": {
|
|
46
|
-
"source": "unknown"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
38
|
}
|
|
51
39
|
}
|
|
52
40
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"datasets": {
|
|
3
|
+
"Default": {
|
|
4
|
+
"fact": "Memos",
|
|
5
|
+
"schema": {
|
|
6
|
+
"Tags": {
|
|
7
|
+
"type": "PatriciaTrie",
|
|
8
|
+
"keyType": "ShortText"
|
|
9
|
+
},
|
|
10
|
+
"Memos": {
|
|
11
|
+
"type": "Hash",
|
|
12
|
+
"keyType": "ShortText",
|
|
13
|
+
"columns": {
|
|
14
|
+
"content": {
|
|
15
|
+
"type": "Scalar",
|
|
16
|
+
"valueType": "Text"
|
|
17
|
+
},
|
|
18
|
+
"tags": {
|
|
19
|
+
"type": "Vector",
|
|
20
|
+
"valueType": "Tags"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"inReplyTo": "request-id",
|
|
3
|
+
"statusCode": 200,
|
|
4
|
+
"type": "search.result",
|
|
5
|
+
"body": {
|
|
6
|
+
"memos": {
|
|
7
|
+
"attributes": [
|
|
8
|
+
{
|
|
9
|
+
"name": "_key",
|
|
10
|
+
"type": "ShortText",
|
|
11
|
+
"vector": false
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "tags",
|
|
15
|
+
"type": "Tags",
|
|
16
|
+
"vector": true
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"records": [
|
|
20
|
+
[
|
|
21
|
+
"Droonga is fun",
|
|
22
|
+
[
|
|
23
|
+
"Droonga",
|
|
24
|
+
"Fun"
|
|
25
|
+
]
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# -*- js -*-
|
|
2
|
+
#@require-catalog-version 2
|
|
3
|
+
#@disable-logging
|
|
4
|
+
{
|
|
5
|
+
"type": "add",
|
|
6
|
+
"dataset": "Default",
|
|
7
|
+
"body": {
|
|
8
|
+
"table": "Memos",
|
|
9
|
+
"key": "Droonga is fun",
|
|
10
|
+
"values": {
|
|
11
|
+
"content": "I started Droonga. It is very fun!",
|
|
12
|
+
"tags": ["Droonga", "Fun"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
#@enable-logging
|
|
17
|
+
{
|
|
18
|
+
"type": "search",
|
|
19
|
+
"dataset": "Default",
|
|
20
|
+
"body": {
|
|
21
|
+
"queries": {
|
|
22
|
+
"memos": {
|
|
23
|
+
"source": "Memos",
|
|
24
|
+
"output": {
|
|
25
|
+
"elements": ["attributes", "records"],
|
|
26
|
+
"attributes": ["_key", "tags"],
|
|
27
|
+
"limit": 10
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"datasets": {
|
|
3
|
+
"Watch": {
|
|
4
|
+
"nWorkers": 2,
|
|
5
|
+
"plugins": ["groonga", "watch", "search", "crud"],
|
|
6
|
+
"replicas": [
|
|
7
|
+
{
|
|
8
|
+
"dimension": "_key",
|
|
9
|
+
"slicer": "hash",
|
|
10
|
+
"slices": [
|
|
11
|
+
{
|
|
12
|
+
"label": "slice100",
|
|
13
|
+
"weight": 50,
|
|
14
|
+
"volume": {
|
|
15
|
+
"address": "127.0.0.1:23003/droonga.watch"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"datasets": {
|
|
3
|
+
"Watch": {
|
|
4
|
+
"nWorkers": 2,
|
|
5
|
+
"plugins": ["groonga", "watch", "search", "crud"],
|
|
6
|
+
"replicas": [
|
|
7
|
+
{
|
|
8
|
+
"dimension": "_key",
|
|
9
|
+
"slicer": "hash",
|
|
10
|
+
"slices": [
|
|
11
|
+
{
|
|
12
|
+
"label": "slice100",
|
|
13
|
+
"weight": 50,
|
|
14
|
+
"volume": {
|
|
15
|
+
"address": "127.0.0.1:23003/droonga.watch"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
#
|
|
14
14
|
# You should have received a copy of the GNU Lesser General Public
|
|
15
15
|
# License along with this library; if not, write to the Free Software
|
|
16
|
-
# Foundation, Inc.,
|
|
16
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
17
|
|
|
18
18
|
require "rbconfig"
|
|
19
19
|
require "fileutils"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/dataset"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/dataset"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/schema"
|
|
17
17
|
|
|
@@ -11,30 +11,38 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/single_volume"
|
|
17
17
|
|
|
18
18
|
class CatalogSingleVolumeTest < Test::Unit::TestCase
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
class AddressTest < self
|
|
20
|
+
def setup
|
|
21
|
+
data = {
|
|
22
|
+
"address" => "127.0.0.1:10047/tag.000",
|
|
23
|
+
}
|
|
24
|
+
@volume = Droonga::Catalog::SingleVolume.new(data)
|
|
25
|
+
end
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
def address(host, port, tag, name)
|
|
28
|
+
Droonga::Address.new(:host => host,
|
|
29
|
+
:port => port,
|
|
30
|
+
:tag => tag,
|
|
31
|
+
:name => name)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def test_address
|
|
35
|
+
assert_equal(address("127.0.0.1", 10047, "tag", "000"),
|
|
36
|
+
@volume.address)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def test_node
|
|
40
|
+
assert_equal("127.0.0.1:10047/tag", @volume.node)
|
|
41
|
+
end
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
volume = create_single_volume(data)
|
|
37
|
-
assert_equal(["127.0.0.1:10047/volume"],
|
|
38
|
-
volume.all_nodes)
|
|
43
|
+
def test_all_nodes
|
|
44
|
+
assert_equal(["127.0.0.1:10047/tag"],
|
|
45
|
+
@volume.all_nodes)
|
|
46
|
+
end
|
|
39
47
|
end
|
|
40
48
|
end
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/dataset"
|
|
17
17
|
|
|
@@ -86,7 +86,7 @@ class CatalogSliceTest < Test::Unit::TestCase
|
|
|
86
86
|
}
|
|
87
87
|
slice = create_slice(data)
|
|
88
88
|
assert_equal("127.0.0.1:10047/volume.000",
|
|
89
|
-
slice.volume.address)
|
|
89
|
+
slice.volume.address.to_s)
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def test_all_nodes
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/version1"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/version2"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/version2_validator"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/catalog/volume_collection"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/plugins/search/distributed_search_planner"
|
|
17
17
|
|
data/test/unit/helper/fixture.rb
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
module Fixture
|
|
17
17
|
def fixture_directory
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
module PluginHelper
|
|
17
17
|
def setup_plugin(plugin_class)
|
data/test/unit/helper/sandbox.rb
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
module Sandbox
|
|
17
17
|
class << self
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class StubWorker
|
|
17
17
|
attr_reader :context, :body, :envelope
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/watch_schema"
|
|
17
17
|
|
data/test/unit/helper.rb
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/test"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/plugins/crud"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/plugins/groonga/select"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
require "droonga/plugins/groonga/select"
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class ColumnCreateTest < GroongaHandlerTest
|
|
17
17
|
def create_handler
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class ColumnListTest < GroongaHandlerTest
|
|
17
17
|
COLUMNS_HEADER = [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class ColumnRemoveTest < GroongaHandlerTest
|
|
17
17
|
def create_handler
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class ColumnRenameTest < GroongaHandlerTest
|
|
17
17
|
def create_handler
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class DeleteTest < GroongaHandlerTest
|
|
17
17
|
def create_handler
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class TableCreateTest < GroongaHandlerTest
|
|
17
17
|
def create_handler
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class TableListTest < GroongaHandlerTest
|
|
17
17
|
TABLES_HEADER = [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class TableRemoveTest < GroongaHandlerTest
|
|
17
17
|
def create_handler
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class DistributedSearchPlannerBasicTest < Test::Unit::TestCase
|
|
17
17
|
include DistributedSearchPlannerHelper
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class DistributedSearchPlannerGroupByTest < Test::Unit::TestCase
|
|
17
17
|
include DistributedSearchPlannerHelper
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# You should have received a copy of the GNU Lesser General Public
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
|
14
|
-
# Foundation, Inc.,
|
|
14
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
15
15
|
|
|
16
16
|
class DistributedSearchPlannerOutputTest < Test::Unit::TestCase
|
|
17
17
|
include DistributedSearchPlannerHelper
|