Class: Confluent::Kafka::DistributedConnect

Inherits:
ServerBase
  • Object
show all
Defined in:
src/confluent-platform/lib/confluent-platform/model/connect.rb

Overview

Base class for Kafka RESTProxy services of Confluent Kafka software. Provides methods for the configuring and managing Confluent Kafka Server.

Since:

  • 0.1.0

Properties (Read/Write)

  • #config ⇒ Pathname (Default Value: ::File.join('/etc', 'kafka-connect', 'kafka-connect.properties'))
    The location path of the broker configuration file

    Property Attributes
    • fromString
    • requiredtrue
    • default::File.join('/etc', 'kafka-connect', 'kafka-connect.properties')
    
    
    40
    41
    # File 'src/confluent-platform/lib/confluent-platform/model/connect.rb', line 40
    
    property :config, type: Pathname, from: String, required: true, default: ::File.join('/etc',
    'kafka-connect', 'kafka-connect.properties')
  • #name ⇒ String (Default Value: self.class.to_s.gsub('::', ''))

    Property Attributes
    • defaultself.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
    • requiredfalse
    
    
    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
    • requiredtrue
    • no_backreftrue
    • paralleltrue
    • disposition:requires
    • defaultProc.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
    • fromString
    • requiredtrue
    • defaultProc.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
    • fromString
    • requiredtrue
    • defaultProc.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
    • defaulttrue
    
    
    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
    • default300
    
    
    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
    • default300
    
    
    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 collapse

DEFAULT_LISTENERS =

Since:

  • 0.1.0
'http://0.0.0.0:8083'.freeze
ENV_VARIABLE_NAMES =

Since:

  • 0.1.0
%w( EXTRA_ARGS INCLUDE_TEST_JARS JAVA_DEBUG_OPTS JAVA_DEBUG_PORT JMX_PORT KAFKA_DEBUG
KAFKA_GC_LOG_OPTS KAFKA_HEAP_OPTS KAFKA_JMX_OPTS KAFKA_JVM_PERFORMANCE_OPTS KAFKA_LOG4J_OPTS KAFKA_OPTS LOG_DIR
SCALA_BINARY_VERSION SCALA_VERSION UPGRADE_KAFKA_STREAMS_TEST_VERSION).freeze

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Instance Attribute Summary collapse

Attributes included from MintPress::Mixins::Properties

#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root

Instance Method Summary collapse

Methods inherited from ServerBase

#==, #check_configuration, compare_properies, #configure_server, #find_process_id, #get_connect_host_port, #get_instance_variables, #harvest, #harvest_server_props, #kill, #method_missing, #process_exists?, #running?, #to_hash, #up_to_date?, #wait, #wait_for_ready

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) ⇒ DistributedConnect

Returns a new instance of DistributedConnect.

Since:

  • 0.1.0

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Confluent::Kafka::ServerBase

Instance Attribute Details

#installationConfluent::Kafka::Installation

Returns the Confluent Platform installation.

Returns:

Instance Method Details

#clobbervoid

This method returns an undefined value.

Clobber the Kafka DistributedConnect configuration

Since:

  • 0.1.0

#configurevoid

This method returns an undefined value.

Configure the Kafka REST-Proxy

Since:

  • 0.1.0

#default_listenerURI

Function to return default listener URI

Returns:

  • (URI)

Since:

  • 0.1.0

#listener_propertiesSymbols

Function to return list of property names that will contain listener details

Returns:

  • (Symbols)
    List of symbols to lookup 'property' map so we can find listen address for the server

Since:

  • 0.1.0

#process_idString

Determine process id running on the node

Returns:

Since:

  • 0.1.0

#start_asyncvoid

This method returns an undefined value.

Non-blocking start the Kafka DistributedConnect process

Since:

  • 0.1.0

#start_syncvoid Also known as: start

This method returns an undefined value.

Start the Kafka DistributedConnect process and block until server is up

Since:

  • 0.1.0

#stop_asyncvoid

This method returns an undefined value.

Non-blocking stop the Kafka DistributedConnect process

Since:

  • 0.1.0

#stop_syncvoid Also known as: stop

This method returns an undefined value.

Stop the Kafka DistributedConnect process and block until server is shutdown

Since:

  • 0.1.0

#usageObject

DIsplay usage information for the

Since:

  • 0.1.0