droonga-engine 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -2
  3. data/Gemfile +1 -1
  4. data/LICENSE.txt +1 -1
  5. data/Rakefile +1 -1
  6. data/benchmark/benchmark.rb +1 -1
  7. data/benchmark/utils.rb +1 -1
  8. data/benchmark/watch/benchmark-notify.rb +1 -1
  9. data/benchmark/watch/benchmark-publish.rb +1 -1
  10. data/benchmark/watch/benchmark-scan.rb +1 -1
  11. data/bin/droonga-engine +1 -1
  12. data/bin/droonga-engine-absorb-data +48 -8
  13. data/bin/droonga-engine-catalog-generate +1 -1
  14. data/bin/droonga-engine-catalog-modify +1 -1
  15. data/bin/droonga-engine-data-publisher +66 -0
  16. data/bin/droonga-engine-join +72 -17
  17. data/bin/droonga-engine-serf-event-handler +1 -1
  18. data/bin/droonga-engine-service +1 -1
  19. data/bin/droonga-engine-unjoin +11 -4
  20. data/bin/droonga-engine-worker +20 -0
  21. data/doc/text/news.md +8 -0
  22. data/droonga-engine.gemspec +3 -3
  23. data/lib/droonga/adapter.rb +1 -1
  24. data/lib/droonga/adapter_runner.rb +1 -1
  25. data/lib/droonga/address.rb +69 -0
  26. data/lib/droonga/buffered_tcp_socket.rb +44 -22
  27. data/lib/droonga/catalog/base.rb +1 -1
  28. data/lib/droonga/catalog/collection_volume.rb +1 -1
  29. data/lib/droonga/catalog/dataset.rb +8 -8
  30. data/lib/droonga/catalog/errors.rb +1 -1
  31. data/lib/droonga/catalog/schema.rb +1 -1
  32. data/lib/droonga/catalog/single_volume.rb +6 -8
  33. data/lib/droonga/catalog/slice.rb +1 -1
  34. data/lib/droonga/catalog/version1.rb +2 -2
  35. data/lib/droonga/catalog/version2.rb +6 -6
  36. data/lib/droonga/catalog/version2_validator.rb +1 -1
  37. data/lib/droonga/catalog/volume.rb +1 -1
  38. data/lib/droonga/catalog/volume_collection.rb +2 -2
  39. data/lib/droonga/catalog_generator.rb +49 -53
  40. data/lib/droonga/catalog_loader.rb +1 -1
  41. data/lib/droonga/collector.rb +1 -1
  42. data/lib/droonga/collector_message.rb +1 -1
  43. data/lib/droonga/collector_runner.rb +1 -1
  44. data/lib/droonga/collectors/and.rb +1 -1
  45. data/lib/droonga/collectors/or.rb +1 -1
  46. data/lib/droonga/collectors/sum.rb +1 -1
  47. data/lib/droonga/collectors.rb +1 -1
  48. data/lib/droonga/command/droonga_engine.rb +103 -55
  49. data/lib/droonga/command/droonga_engine_service.rb +22 -67
  50. data/lib/droonga/command/droonga_engine_worker.rb +232 -0
  51. data/lib/droonga/command/serf_event_handler.rb +126 -46
  52. data/lib/droonga/data_absorber.rb +32 -14
  53. data/lib/droonga/dispatcher.rb +15 -11
  54. data/lib/droonga/distributed_command_planner.rb +1 -1
  55. data/lib/droonga/distributor.rb +1 -1
  56. data/lib/droonga/engine/version.rb +2 -2
  57. data/lib/droonga/engine.rb +8 -3
  58. data/lib/droonga/engine_state.rb +15 -6
  59. data/lib/droonga/error.rb +1 -1
  60. data/lib/droonga/error_messages.rb +1 -1
  61. data/lib/droonga/event_loop.rb +1 -1
  62. data/lib/droonga/farm.rb +9 -1
  63. data/lib/droonga/file_observer.rb +1 -1
  64. data/lib/droonga/fluent_message_receiver.rb +11 -5
  65. data/lib/droonga/fluent_message_sender.rb +14 -17
  66. data/lib/droonga/forwarder.rb +23 -13
  67. data/lib/droonga/handler.rb +1 -1
  68. data/lib/droonga/handler_message.rb +1 -1
  69. data/lib/droonga/handler_messenger.rb +2 -2
  70. data/lib/droonga/handler_runner.rb +2 -2
  71. data/lib/droonga/input_message.rb +1 -1
  72. data/lib/droonga/internal_fluent_message_receiver.rb +3 -2
  73. data/lib/droonga/job_protocol.rb +1 -1
  74. data/lib/droonga/job_pusher.rb +1 -1
  75. data/lib/droonga/job_receiver.rb +1 -1
  76. data/lib/droonga/line_buffer.rb +1 -1
  77. data/lib/droonga/live_nodes_list_loader.rb +1 -1
  78. data/lib/droonga/loggable.rb +1 -1
  79. data/lib/droonga/logger.rb +3 -3
  80. data/lib/droonga/message_matcher.rb +1 -1
  81. data/lib/droonga/output_message.rb +1 -1
  82. data/lib/droonga/path.rb +5 -1
  83. data/lib/droonga/planner.rb +1 -1
  84. data/lib/droonga/pluggable.rb +1 -1
  85. data/lib/droonga/plugin/metadata/adapter_input_message.rb +1 -1
  86. data/lib/droonga/plugin/metadata/adapter_output_message.rb +1 -1
  87. data/lib/droonga/plugin/metadata/collector_message.rb +1 -1
  88. data/lib/droonga/plugin/metadata/handler_action.rb +1 -1
  89. data/lib/droonga/plugin/metadata/input_message.rb +1 -1
  90. data/lib/droonga/plugin.rb +2 -1
  91. data/lib/droonga/plugin_loader.rb +1 -1
  92. data/lib/droonga/plugin_registry.rb +3 -1
  93. data/lib/droonga/plugins/basic.rb +1 -1
  94. data/lib/droonga/plugins/crud.rb +1 -1
  95. data/lib/droonga/plugins/dump.rb +13 -2
  96. data/lib/droonga/plugins/error.rb +1 -1
  97. data/lib/droonga/plugins/groonga/column_create.rb +1 -1
  98. data/lib/droonga/plugins/groonga/column_list.rb +1 -1
  99. data/lib/droonga/plugins/groonga/column_remove.rb +1 -1
  100. data/lib/droonga/plugins/groonga/column_rename.rb +1 -1
  101. data/lib/droonga/plugins/groonga/delete.rb +1 -1
  102. data/lib/droonga/plugins/groonga/generic_command.rb +1 -1
  103. data/lib/droonga/plugins/groonga/generic_response.rb +1 -1
  104. data/lib/droonga/plugins/groonga/select.rb +1 -1
  105. data/lib/droonga/plugins/groonga/table_create.rb +1 -1
  106. data/lib/droonga/plugins/groonga/table_list.rb +1 -1
  107. data/lib/droonga/plugins/groonga/table_remove.rb +1 -1
  108. data/lib/droonga/plugins/groonga.rb +1 -1
  109. data/lib/droonga/plugins/search/distributed_search_planner.rb +1 -1
  110. data/lib/droonga/plugins/search.rb +1 -1
  111. data/lib/droonga/plugins/system.rb +1 -1
  112. data/lib/droonga/plugins/watch.rb +1 -1
  113. data/lib/droonga/{service_control_protocol.rb → process_control_protocol.rb} +2 -2
  114. data/lib/droonga/process_supervisor.rb +91 -0
  115. data/lib/droonga/processor.rb +1 -1
  116. data/lib/droonga/reducer.rb +1 -1
  117. data/lib/droonga/replier.rb +2 -2
  118. data/lib/droonga/safe_file_writer.rb +1 -1
  119. data/lib/droonga/schema_applier.rb +1 -1
  120. data/lib/droonga/searcher/mecab_filter.rb +1 -1
  121. data/lib/droonga/searcher.rb +31 -19
  122. data/lib/droonga/serf.rb +81 -14
  123. data/lib/droonga/serf_downloader.rb +2 -2
  124. data/lib/droonga/session.rb +1 -1
  125. data/lib/droonga/single_step.rb +1 -1
  126. data/lib/droonga/single_step_definition.rb +1 -1
  127. data/lib/droonga/slice.rb +30 -28
  128. data/lib/droonga/status_code.rb +1 -1
  129. data/lib/droonga/step_runner.rb +1 -1
  130. data/lib/droonga/supervisor.rb +170 -0
  131. data/lib/droonga/sweeper.rb +1 -1
  132. data/lib/droonga/test/stub_handler.rb +1 -1
  133. data/lib/droonga/test/stub_handler_message.rb +1 -1
  134. data/lib/droonga/test/stub_handler_messenger.rb +1 -1
  135. data/lib/droonga/test/stub_planner.rb +1 -1
  136. data/lib/droonga/test.rb +1 -1
  137. data/lib/droonga/watch_schema.rb +2 -2
  138. data/lib/droonga/watcher.rb +1 -1
  139. data/lib/droonga/worker_process_agent.rb +111 -0
  140. data/sample/cluster/Rakefile +150 -0
  141. data/test/command/config/default/catalog.json +1 -34
  142. data/test/command/config/version1/catalog.json +3 -12
  143. data/test/command/run-test.rb +1 -1
  144. data/test/command/suite/dump/column/index.expected +19 -82
  145. data/test/command/suite/dump/column/scalar.expected +5 -36
  146. data/test/command/suite/dump/column/vector.expected +5 -39
  147. data/test/command/suite/dump/record/vector/reference.expected +24 -93
  148. data/test/command/suite/dump/table/array.expected +0 -19
  149. data/test/command/suite/dump/table/double_array_trie.expected +0 -20
  150. data/test/command/suite/dump/table/hash.expected +0 -20
  151. data/test/command/suite/dump/table/patricia_trie.expected +0 -20
  152. data/test/command/suite/search/condition/query/nonexistent_column.expected +0 -11
  153. data/test/command/suite/search/condition/query/syntax_error.expected +0 -11
  154. data/test/command/suite/search/error/unknown-source.expected +0 -12
  155. data/test/command/suite/search/output/attributes/invalid.expected +0 -10
  156. data/test/command/suite/search/output/attributes/reference_vector.catalog.json +27 -0
  157. data/test/command/suite/search/output/attributes/reference_vector.expected +30 -0
  158. data/test/command/suite/search/output/attributes/reference_vector.test +32 -0
  159. data/test/command/suite/watch/subscribe.catalog.json +23 -0
  160. data/test/command/suite/watch/subscribe.test +2 -0
  161. data/test/command/suite/watch/unsubscribe.catalog.json +23 -0
  162. data/test/command/suite/watch/unsubscribe.test +2 -0
  163. data/test/performance/run-test.rb +1 -1
  164. data/test/unit/catalog/test_collection_volume.rb +1 -1
  165. data/test/unit/catalog/test_dataset.rb +1 -1
  166. data/test/unit/catalog/test_schema.rb +1 -1
  167. data/test/unit/catalog/test_single_volume.rb +27 -19
  168. data/test/unit/catalog/test_slice.rb +2 -2
  169. data/test/unit/catalog/test_version1.rb +1 -1
  170. data/test/unit/catalog/test_version2.rb +1 -1
  171. data/test/unit/catalog/test_version2_validator.rb +1 -1
  172. data/test/unit/catalog/test_volume_collection.rb +1 -1
  173. data/test/unit/helper/distributed_search_planner_helper.rb +1 -1
  174. data/test/unit/helper/fixture.rb +1 -1
  175. data/test/unit/helper/plugin_helper.rb +1 -1
  176. data/test/unit/helper/sandbox.rb +1 -1
  177. data/test/unit/helper/stub_worker.rb +1 -1
  178. data/test/unit/helper/watch_helper.rb +1 -1
  179. data/test/unit/helper.rb +1 -1
  180. data/test/unit/plugins/crud/test_add.rb +1 -1
  181. data/test/unit/plugins/groonga/select/test_adapter_input.rb +1 -1
  182. data/test/unit/plugins/groonga/select/test_adapter_output.rb +1 -1
  183. data/test/unit/plugins/groonga/test_column_create.rb +1 -1
  184. data/test/unit/plugins/groonga/test_column_list.rb +1 -1
  185. data/test/unit/plugins/groonga/test_column_remove.rb +1 -1
  186. data/test/unit/plugins/groonga/test_column_rename.rb +1 -1
  187. data/test/unit/plugins/groonga/test_delete.rb +1 -1
  188. data/test/unit/plugins/groonga/test_table_create.rb +1 -1
  189. data/test/unit/plugins/groonga/test_table_list.rb +1 -1
  190. data/test/unit/plugins/groonga/test_table_remove.rb +1 -1
  191. data/test/unit/plugins/search/planner/test_basic.rb +1 -1
  192. data/test/unit/plugins/search/planner/test_group_by.rb +1 -1
  193. data/test/unit/plugins/search/planner/test_output.rb +1 -1
  194. data/test/unit/plugins/search/planner/test_sort_by.rb +1 -1
  195. data/test/unit/plugins/search/test_collector.rb +1 -1
  196. data/test/unit/plugins/search/test_handler.rb +1 -1
  197. data/test/unit/plugins/search/test_planner.rb +1 -1
  198. data/test/unit/plugins/system/test_status.rb +1 -1
  199. data/test/unit/plugins/test_basic.rb +1 -1
  200. data/test/unit/plugins/test_groonga.rb +1 -1
  201. data/test/unit/plugins/test_watch.rb +1 -1
  202. data/test/unit/run-test.rb +1 -1
  203. data/test/unit/test_address.rb +53 -0
  204. data/test/unit/test_catalog_generator.rb +59 -1
  205. data/test/unit/test_line_buffer.rb +1 -1
  206. data/test/unit/test_message_matcher.rb +1 -1
  207. data/test/unit/test_schema_applier.rb +1 -1
  208. data/test/unit/test_sweeper.rb +1 -1
  209. data/test/unit/test_watch_schema.rb +1 -1
  210. data/test/unit/test_watcher.rb +1 -1
  211. metadata +39 -24
  212. data/lib/droonga/server.rb +0 -45
  213. data/lib/droonga/worker.rb +0 -66
  214. data/sample/cluster/catalog.json +0 -42
  215. data/test/command/config/default/fluentd.conf +0 -11
  216. data/test/command/config/version1/fluentd.conf +0 -11
@@ -1,42 +0,0 @@
1
- {
2
- "version": 2,
3
- "effectiveDate": "2013-09-01T00:00:00Z",
4
- "datasets": {
5
- "Default": {
6
- "nWorkers": 2,
7
- "plugins": ["groonga", "search", "crud"],
8
- "schema": {
9
- },
10
- "replicas": [
11
- {
12
- "slices": [
13
- {
14
- "volume": {
15
- "address": "127.0.0.1:10031/droonga.000"
16
- }
17
- },
18
- {
19
- "volume": {
20
- "address": "127.0.0.1:10031/droonga.001"
21
- }
22
- }
23
- ]
24
- },
25
- {
26
- "slices": [
27
- {
28
- "volume": {
29
- "address": "127.0.0.1:10031/droonga.010"
30
- }
31
- },
32
- {
33
- "volume": {
34
- "address": "127.0.0.1:10031/droonga.011"
35
- }
36
- }
37
- ]
38
- }
39
- ]
40
- }
41
- }
42
- }
@@ -1,11 +0,0 @@
1
- <source>
2
- type forward
3
- port 23003
4
- </source>
5
- <match droonga.message>
6
- name 127.0.0.1:23003/droonga
7
- type droonga
8
- </match>
9
- <match output.message>
10
- type stdout
11
- </match>
@@ -1,11 +0,0 @@
1
- <source>
2
- type forward
3
- port 23003
4
- </source>
5
- <match droonga.message>
6
- name 127.0.0.1:23003/droonga
7
- type droonga
8
- </match>
9
- <match output.message>
10
- type stdout
11
- </match>