Class: Kafkat::ClusterRestart::Subcommands::Log
- Inherits:
-
Kafkat::Command::Base
- Object
- Kafkat::Command::Base
- Kafkat::ClusterRestart::Subcommands::Log
- Defined in:
- lib/kafkat/command/cluster_restart.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Attributes inherited from Kafkat::Command::Base
Instance Method Summary collapse
Methods inherited from Kafkat::Command::Base
#admin, #initialize, #kafka_logs, register_as, usage, usages, #zookeeper
Methods included from Logging
Methods included from Kafkat::CommandIO
#prompt_and_execute_assignments
Methods included from Formatting
#justify, #print_assignment, #print_assignment_header, #print_broker, #print_broker_header, #print_partition, #print_partition_header, #print_topic, #print_topic_header, #print_topic_name
Constructor Details
This class inherits a constructor from Kafkat::Command::Base
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
127 128 129 |
# File 'lib/kafkat/command/cluster_restart.rb', line 127 def session @session end |
Instance Method Details
#run ⇒ Object
129 130 131 132 133 134 135 136 137 138 |
# File 'lib/kafkat/command/cluster_restart.rb', line 129 def run unless Session.exists? puts "ERROR: no session in progress" puts "\n[Action] Please run 'start' command" exit 1 end @session = Session.load! puts JSON.pretty_generate(@session.to_h) end |