[Groonga-commit] droonga/wikipedia-search at ddff48a [master] Use droonga-engine

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 22 13:10:53 JST 2014


Kouhei Sutou	2014-04-22 13:10:53 +0900 (Tue, 22 Apr 2014)

  New Revision: ddff48a7123592af59e359aff345213b83ee2873
  https://github.com/droonga/wikipedia-search/commit/ddff48a7123592af59e359aff345213b83ee2873

  Message:
    Use droonga-engine

  Modified files:
    Gemfile
    lib/wikipedia-search/task.rb

  Modified: Gemfile (+4 -4)
===================================================================
--- Gemfile    2014-04-16 19:44:33 +0900 (86aec66)
+++ Gemfile    2014-04-22 13:10:53 +0900 (e0b7ca4)
@@ -9,11 +9,11 @@ gem "cool.io"
 gem "test-unit", :require => false
 
 base_dir = File.dirname(__FILE__)
-local_fluent_plugin_droonga = File.join(base_dir, "..", "fluent-plugin-droonga")
-if File.exist?(local_fluent_plugin_droonga)
-  gem "fluent-plugin-droonga", :path => local_fluent_plugin_droonga
+local_droonga_engine = File.join(base_dir, "..", "droonga-engine")
+if File.exist?(local_droonga_engine)
+  gem "droonga-engine", :path => local_droonga_engine
 else
-  gem "fluent-plugin-droonga", :github => "droonga/fluent-plugin-droonga"
+  gem "droonga-engine", :github => "droonga/droonga-engine"
 end
 
 local_droonga_client_ruby = File.join(base_dir, "..", "droonga-client-ruby")

  Modified: lib/wikipedia-search/task.rb (+4 -19)
===================================================================
--- lib/wikipedia-search/task.rb    2014-04-16 19:44:33 +0900 (ccc48ef)
+++ lib/wikipedia-search/task.rb    2014-04-22 13:10:53 +0900 (0f0435c)
@@ -217,23 +217,6 @@ module WikipediaSearch
       24000 + node_id
     end
 
-    def droonga_generate_fluentd_conf(node_id)
-      fluend_conf_path =****@path*****_conf(node_id)
-      fluend_conf_path.open("w") do |fluend_conf|
-        port = droonga_port(node_id)
-        fluend_conf.puts(<<-CONF)
-<source>
-  type forward
-  port #{port}
-</source>
-<match droonga.message>
-  type droonga
-  name 127.0.0.1:#{port}/droonga
-</match>
-        CONF
-      end
-    end
-
     def droonga_generate_catalog(node_ids)
       replicas_path =****@path*****_dir + "replicas.json"
       replicas_path.open("w") do |replicas_file|
@@ -262,8 +245,10 @@ module WikipediaSearch
     end
 
     def droonga_run_engine(node_id)
-      spawn("fluentd",
-            "--config", @path.droonga.fluentd_conf(node_id).expand_path.to_s,
+      spawn("droonga-engine",
+            "--host", "127.0.0.1",
+            "--port", droonga_port(node_id).to_s,
+            "--tag", "droonga",
             :chdir => @path.droonga.working_dir.to_s)
     end
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index