YUKI Hiroshi
null+****@clear*****
Thu Dec 25 15:54:03 JST 2014
YUKI Hiroshi 2014-12-25 15:54:03 +0900 (Thu, 25 Dec 2014) New Revision: 24d9f14865931ef1a07244acc7e35ea4ea61210c https://github.com/droonga/droonga-engine/commit/24d9f14865931ef1a07244acc7e35ea4ea61210c Message: Split "role" to two axis: role and type. old => new role=protocol-adapter => type=protocol-adapter role=engine => type=engine, role=service-provider role=engine-absorb-source => type=engine, role=absorb-source role=engine-absorb-destination => type=engine, role=absorb-destination Modified files: lib/droonga/live_nodes_list.rb lib/droonga/node_metadata.rb lib/droonga/serf.rb Modified: lib/droonga/live_nodes_list.rb (+1 -0) =================================================================== --- lib/droonga/live_nodes_list.rb 2014-12-25 15:17:46 +0900 (d564a7e) +++ lib/droonga/live_nodes_list.rb 2014-12-25 15:54:03 +0900 (deeaddb) @@ -65,6 +65,7 @@ module Droonga nodes = [] @nodes.each do |name, state| if not state["foreign"] and + state["tags"]["type"] == "engine" and state["tags"]["role"] == role nodes << name end Modified: lib/droonga/node_metadata.rb (+3 -3) =================================================================== --- lib/droonga/node_metadata.rb 2014-12-25 15:17:46 +0900 (cf6cab2) +++ lib/droonga/node_metadata.rb 2014-12-25 15:54:03 +0900 (bb63ac6) @@ -20,9 +20,9 @@ require "droonga/safe_file_writer" module Droonga class NodeMetadata module Role - SERVICE_PROVIDER = "engine" - ABSORB_SOURCE = "engine-absorb-source" - ABSORB_DESTINATION = "engine-absorb-destination" + SERVICE_PROVIDER = "service-provider" + ABSORB_SOURCE = "absorb-source" + ABSORB_DESTINATION = "absorb-destination" end def initialize Modified: lib/droonga/serf.rb (+1 -0) =================================================================== --- lib/droonga/serf.rb 2014-12-25 15:17:46 +0900 (15ad5c3) +++ lib/droonga/serf.rb 2014-12-25 15:54:03 +0900 (f1528bc) @@ -64,6 +64,7 @@ module Droonga "-bind", "#{extract_host(@name)}:#{port}", "-event-handler", "droonga-engine-serf-event-handler", "-log-level", log_level, + "-tag", "type=engine", "-tag", "role=#{role}", "-tag", "cluster_id=#{cluster_id}", *retry_joins) -------------- next part -------------- HTML����������������������������... 다운로드