Class: Droonga::Serf::RemoteCommand::RemoveReplicas

Inherits:
ModifyReplicasBase show all
Defined in:
lib/droonga/serf/remote_command.rb

Instance Attribute Summary

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#initialize, #log, #should_process?

Constructor Details

This class inherits a constructor from Droonga::Serf::RemoteCommand::Base

Instance Method Details

#processObject



301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/droonga/serf/remote_command.rb', line 301

def process
  return if dataset.nil? or hosts.nil?

  log("removing replicas: #{hosts.join(",")}")

  log("removing replicas from the cluster")
  Catalog::Modifier.new(catalog).modify do |modifier, file|
    modifier.datasets[dataset].replicas.hosts -= hosts
    @service_installation.ensure_correct_file_permission(file)
  end
  log("done")
end