class Kafkat::ClusterRestart::Subcommands::Restore

Attributes

session[R]

Public Instance Methods

run() click to toggle source
# File lib/kafkat/command/cluster_restart.rb, line 75
def run
  if Session.exists?
    puts "ERROR: A session is already started"
    puts "\n[Action] Please run 'next' or 'reset' commands"
    exit 1
  end

  file_name = ARGV[0]
  @session = Session.load!(file_name)
  @session.save!
  puts "Session restored"
  puts "\m[Action] Please run 'next' to select the broker with lowest restarting cost"
end