Class: Confluent::Kafka::ServerBase
- Inherits:
-
Object
- Object
- Confluent::Kafka::ServerBase
- Includes:
- MintLogger, MintPress::Mixins::Properties
- Defined in:
- src/confluent-platform/lib/confluent-platform/model/server_base.rb
Overview
Direct Known Subclasses
Broker, ControlCenter, DistributedConnect, KSQLServer, RestProxy, SchemaRegistry, Zookeeper
Properties (Read/Write)
-
#name ⇒ String (Default Value: self.class.to_s.gsub('::', ''))
Property Attributes- default ⇒ self.class.to_s.gsub('::', '')
57
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 57 property :Name, type: String, default: self.class.to_s.gsub('::', '')
-
#installation ⇒ Confluent::Kafka::Installation
The Kafka installation associated with this Server
Property Attributes- required ⇒ false
60
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 60 property :installation, type: Confluent::Kafka::Installation, required: false
-
#host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { self.get_property(:installation) ? self.installation.host : nil })
If the user specifies transport, default to a new host with it, otherwise try java installation ... we'll raise exception if none of this stuff ends up resolving...
Property Attributes- required ⇒ true
- no_backref ⇒ true
- parallel ⇒ true
- disposition ⇒ :requires
- default ⇒ Proc.new { self.get_property(:installation) ? self.installation.host : nil }
64 65
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 64 property :host, type: MintPress::Infrastructure::Host, required: true, no_backref: true, parallel: true, disposition: :requires, default: Proc.new { self.get_property(:installation) ? self.installation.host : nil }
-
#java_home ⇒ Pathname (Default Value: Proc.new { self.get_property(:installation) ? self.installation.java_home : nil })
The JAVA_HOME location to use for this installation
Property Attributes- from ⇒ String
- required ⇒ true
- default ⇒ Proc.new { self.get_property(:installation) ? self.installation.java_home : nil }
72 73
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 72 property :java_home, type: Pathname, from: String, required: true, default: Proc.new { self.get_property(:installation) ? self.installation.java_home : nil }
-
#kafka_home ⇒ Pathname (Default Value: Proc.new { self.get_property(:installation) ? self.installation.kafka_home : nil })
The KAFKA_HOME location where this software will be installed
Property Attributes- from ⇒ String
- required ⇒ true
- default ⇒ Proc.new { self.get_property(:installation) ? self.installation.kafka_home : nil }
76 77
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 76 property :kafka_home, type: Pathname, from: String, required: true, default: Proc.new { self.get_property(:installation) ? self.installation.kafka_home : nil }
-
#properties ⇒ Hash (Default Value: {})
Additional properties which will be added to the server.properties file as key/value pairs
Property Attributes- default ⇒ {}
80
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 80 property :properties, type: Hash, default: {}
-
#removed_properties ⇒ Hash (Default Value: {})
list of properties that will be removed from the server.properties file as key/value pairs
Property Attributes- default ⇒ {}
83
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 83 property :removed_properties, type: Hash, default: {}
-
#server_env_opts ⇒ Hash (Default Value: {})
'Map containing environment variables'
Property Attributes- default ⇒ {}
86
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 86 property :server_env_opts, type: Hash, default: {}, description: 'Map containing environment variables'
-
#daemon_mode ⇒ [TrueClass, FalseClass] (Default Value: true)
'Whether server runs in daemon mode'
Property Attributes- default ⇒ true
88
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 88 property :daemon_mode, type: [TrueClass, FalseClass], default: true, description: 'Whether server runs in daemon mode'
-
#start_timeout_sec ⇒ Integer (Default Value: 300)
'Start action timeout in seconds'
Property Attributes- default ⇒ 300
90
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 90 property :start_timeout_sec, type: Integer, default: 300, description: 'Start action timeout in seconds'
-
#stop_timeout_sec ⇒ Integer (Default Value: 300)
'Stop action timeout in seconds'
Property Attributes- default ⇒ 300
92
# File 'src/confluent-platform/lib/confluent-platform/model/server_base.rb', line 92 property :stop_timeout_sec, type: Integer, default: 300, description: 'Stop action timeout in seconds'
Properties (Read Only)
Constant Summary
Constants included from MintLogger
MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN
Instance Attribute Summary collapse
-
#installation ⇒ Confluent::Kafka::Installation
The Confluent Platform installation.
Attributes included from MintPress::Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Class Method Summary collapse
-
.compare_properies(map1, map2) ⇒ Object
Determine the difference between two maps This function will be used to see what properties are different between two property maps.
Instance Method Summary collapse
-
#==(other) ⇒ True/False
Compare Objects.
-
#check_configuration ⇒ Array of Arrays
Check current server configuration to determine the difference between configured and actual [ '+', key, value] This means that the property is not on the server and will be added [ '~', key, value1, value2] This means that the property on the server is different to the value1 [ '-', key, value] This means that the property is on the server but not in the object (nothing will be done).
-
#clobber(pre_clobber_proc: nil, post_clobber_proc: nil) ⇒ void
Clobber the Server configuration.
-
#configure_server(pre_configure_proc: nil, post_configure_proc: nil, backup_properties: true) ⇒ void
Configure the Server.
-
#find_process_id(search_keywords) ⇒ String
Determine Kafka Broker process id running on the node.
-
#get_connect_host_port ⇒ String, Integer
Function to return connection host and port details for the server.
- #get_instance_variables ⇒ Object
-
#harvest ⇒ void
Harvest the server configuration from the target.
-
#harvest_server_props(filename) ⇒ Hash
Harvest server properties.
-
#initialize(opts = {}) ⇒ Confluent::Kafka::Server
constructor
The constructor See https://docs.confluent.io/current/installation/configuration/broker-configs.html for details.
-
#kill ⇒ void
Stop Kafka process by sending kill signal.
-
#method_missing(m, *args, &block) ⇒ Object
Handle function that may retrieve Zookeper properties from 'properties' attribute.
- #process_exists? ⇒ Boolean
-
#process_id ⇒ String
Determine Kafka Broker process id running on the node.
-
#running? ⇒ TrueClass|FalseClass
Determine whether Server instances are running on the node.
-
#to_hash ⇒ Hash
Return a Hash representation for this class and all its sub-classes.
-
#up_to_date? ⇒ True/False
Check if remote server is up-to-date with configurations.
- #usage ⇒ Object
-
#wait ⇒ True
Wait for the server to start serving requests on the listening port.
-
#wait_for_ready(timeout_sec = 10, retry_frequency_sec = 5) ⇒ True
Wait for the server to start serving requests on the listening port.
Methods included from MintPress::Mixins::Properties
#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref
Methods included from MintLogger::Utils::Common
#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send
Constructor Details
#initialize(opts = {}) ⇒ Confluent::Kafka::Server
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
Instance Attribute Details
#installation ⇒ Confluent::Kafka::Installation
Class Method Details
.compare_properies(map1, map2) ⇒ Object
Instance Method Details
#==(other) ⇒ True/False
#check_configuration ⇒ Array of Arrays
#clobber(pre_clobber_proc: nil, post_clobber_proc: nil) ⇒ void
This method returns an undefined value.
Clobber the Server configuration#configure_server(pre_configure_proc: nil, post_configure_proc: nil, backup_properties: true) ⇒ void
This method returns an undefined value.
Configure the Server#find_process_id(search_keywords) ⇒ String
#get_connect_host_port ⇒ String, Integer
#get_instance_variables ⇒ Object
#harvest ⇒ void
This method returns an undefined value.
Harvest the server configuration from the target#harvest_server_props(filename) ⇒ Hash
#kill ⇒ void
This method returns an undefined value.
Stop Kafka process by sending kill signal