Navigation Menu

Skip to content

Commit

Permalink
Isolate command implementations from NodeMetadata
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2015
1 parent f1f606b commit 0ffb346
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion bin/droonga-engine-absorb-data
Expand Up @@ -26,7 +26,6 @@ require "droonga/node_name"
require "droonga/data_absorber_client"
require "droonga/serf"
require "droonga/client"
require "droonga/node_metadata"
require "droonga/restarter"

module Droonga
Expand Down
10 changes: 5 additions & 5 deletions bin/droonga-engine-join
Expand Up @@ -24,13 +24,13 @@ require "coolio"
require "droonga/engine/version"
require "droonga/path"
require "droonga/node_name"
require "droonga/node_role"
require "droonga/catalog/dataset"
require "droonga/catalog/fetcher"
require "droonga/catalog/loader"
require "droonga/safe_file_writer"
require "droonga/data_absorber_client"
require "droonga/serf"
require "droonga/node_metadata"

module Droonga
class JoinCommand
Expand Down Expand Up @@ -223,7 +223,7 @@ module Droonga
puts("Changing role of the source node...")
source_node_serf.send_query("change_role",
"node" => source_node.to_s,
"role" => NodeMetadata::Role::ABSORB_SOURCE)
"role" => NodeRole::ABSORB_SOURCE)
wait_until_restarted(source_node)
end
@source_node_role_changed = true
Expand All @@ -233,7 +233,7 @@ module Droonga
puts("Changing role of the joining node...")
joining_node_serf.send_query("change_role",
"node" => joining_node.to_s,
"role" => NodeMetadata::Role::ABSORB_DESTINATION)
"role" => NodeRole::ABSORB_DESTINATION)
wait_until_restarted(joining_node)
@joining_node_role_changed = true
end
Expand All @@ -243,7 +243,7 @@ module Droonga
puts("Restoring role of the source node...")
source_node_serf.send_query("change_role",
"node" => source_node.to_s,
"role" => NodeMetadata::Role::SERVICE_PROVIDER)
"role" => NodeRole::SERVICE_PROVIDER)
wait_until_restarted(source_node.to_s)
end
@source_node_role_changed = false
Expand All @@ -253,7 +253,7 @@ module Droonga
puts("Restoring role of the joining node...")
joining_node_serf.send_query("change_role",
"node" => joining_node.to_s,
"role" => NodeMetadata::Role::SERVICE_PROVIDER)
"role" => NodeRole::SERVICE_PROVIDER)
wait_until_restarted(joining_node.to_s)
@joining_node_role_changed = false
end
Expand Down

0 comments on commit 0ffb346

Please sign in to comment.