Class: Command::AmbariServiceComponentInfo

Inherits:
AmbariClusterServiceCommand show all
Defined in:
lib/command/ambari_service_component_info.rb

Overview

# Command used to get information on a cluster’s ambari service.

Instance Attribute Summary collapse

Attributes inherited from AmbariClusterServiceCommand

#service_name

Attributes inherited from BasicCommand

#logger, #receiver

Instance Method Summary collapse

Constructor Details

#initialize(service_name, cluster_name, component) ⇒ Hash

The execution of the command.



19
20
21
22
23
# File 'lib/command/ambari_service_component_info.rb', line 19

def initialize (service_name,cluster_name ,component)
  super(cluster_name,service_name)
  @cluster_name=  cluster_name
  @component=  component
end

Instance Attribute Details

#cluster_nameObject

Returns the value of attribute cluster_name.



13
14
15
# File 'lib/command/ambari_service_component_info.rb', line 13

def cluster_name
  @cluster_name
end

#componentObject

Returns the value of attribute component.



14
15
16
# File 'lib/command/ambari_service_component_info.rb', line 14

def component
  @component
end

#hostnameObject

Returns the value of attribute hostname.



12
13
14
# File 'lib/command/ambari_service_component_info.rb', line 12

def hostname
  @hostname
end

Instance Method Details

#execObject



24
25
26
# File 'lib/command/ambari_service_component_info.rb', line 24

def exec()
  return receiver.show_service_components(@cluster_name, @service_name ,@component)
end