Class: Confluent::Kafka::Topic
- Inherits:
-
Object
- Object
- Confluent::Kafka::Topic
- Includes:
- MintLogger, MintPress::Mixins::Properties
- Defined in:
- src/confluent-platform/lib/confluent-platform/model/topic.rb
Overview
Properties (Read/Write)
-
#installation ⇒ Confluent::Kafka::Installation
The Kafka installation associated with this object
Property Attributes54
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 54 property :installation, type: Confluent::Kafka::Installation
-
#host ⇒ MintPress::Infrastructure::Host (Default Value: Proc.new { r=nil
if self.get_property(:installation)
r = self.installation.host
end
r
})
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... why get_property? because parent may not be defined... getproperty wont exception, but self.xxx will!
Property Attributes- required ⇒ true
- default ⇒ Proc.new { r=nil if self.get_property(:installation) r = self.installation.host end r }
- no_backref ⇒ true
- parallel ⇒ true
- disposition ⇒ :requires
60 61 62 63 64 65
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 60 property :host, type: MintPress::Infrastructure::Host, required: true, default: Proc.new { r=nil if self.get_property(:installation) r = self.installation.host end r }, no_backref: true, parallel: true, disposition: :requires
-
#topic ⇒ String
Name of the Topic
Property Attributes- required ⇒ true
87
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 87 property :Topic, type: String, required: true
-
#partitions ⇒ Integer
Number of partitions Note: Kafka topics are divided into a number of partitions. Partitions allow you to parallelize a topic by splitting the data in a particular topic across multiple brokers — each partition can be placed on a separate machine to allow for multiple consumers to read from a topic in parallel.
Property Attributes- required ⇒ true
95
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 95 property :Partitions, type: Integer, required: true
-
#topic_partitions ⇒ Hash of ⇒ Confluent::Kafka::TopicPartition (Default Value: {})
Property Attributes- default ⇒ {}
96
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 96 property :TopicPartitions, type: Confluent::Kafka::TopicPartition, hash: true, default: {}
-
#replication_factor ⇒ Integer
Replication Factor for the Topic Note: Replication factor defines the number of copies of a topic in a Kafka cluster. Replication factor can be defined at topic level. Replicas are distributed evenly among Kafka brokers in a cluster.
Property Attributes- required ⇒ true
102
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 102 property :ReplicationFactor, type: Integer, required: true
-
#replica_assignment ⇒ Hash (Default Value: {})
A list of manual partition-to-broker assignments for the topic being created or altered broker_id_for_part1_replica1:broker_id_for_part1_replica2,broker_id_for_part2_replica1:broker_id_for_part2_replica2
Property Attributes- default ⇒ {}
106
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 106 property :ReplicaAssignment, type: Hash, default: {}
-
#at_min_isr_partitions ⇒ [ TrueClass, FalseClass ] (Default Value: false)
if set when describing topics, only show partitions whose isr count is equal to the configured minimum. Not supported with the --zookeeper option.
Property Attributes- default ⇒ false
110
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 110 property :AtMinIsrPartitions, type: [ TrueClass, FalseClass ], default: false
-
#topics_with_overrides ⇒ [ TrueClass, FalseClass ] (Default Value: false)
if set when describing topics, only show topics that have overridden configs
Property Attributes- default ⇒ false
113
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 113 property :TopicsWithOverrides, type: [ TrueClass, FalseClass ], default: false
-
#unavailable_partitions ⇒ [ TrueClass, FalseClass ] (Default Value: false)
if set when describing topics, only show partitions whose leader is not available
Property Attributes- default ⇒ false
115
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 115 property :UnavailablePartitions, type: [ TrueClass, FalseClass ], default: false
-
#under_min_isr_partitions ⇒ [ TrueClass, FalseClass ] (Default Value: false)
if set when describing topics, only show partitions whose isr count is less than the configured minimum. Not supported with the --zookeeper option.
Property Attributes- default ⇒ false
119
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 119 property :UnderMinIsrPartitions, type: [ TrueClass, FalseClass ], default: false
-
#under_replication_partitions ⇒ [ TrueClass, FalseClass ] (Default Value: false)
if set when describing topics, only show under replicated partitions
Property Attributes- default ⇒ false
122
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 122 property :UnderReplicationPartitions, type: [ TrueClass, FalseClass ], default: false
-
#config ⇒ Hash (Default Value: {})
Additional config options to be passed to the kafka-topics() utility as key/value pairs
Property Attributes- default ⇒ {}
125
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 125 property :Config, type: Hash, default: {}
-
#bootstrap_server ⇒ String
The Broker(s) this Topic is to be bootstrapped from
Property Attributes128
# File 'src/confluent-platform/lib/confluent-platform/model/topic.rb', line 128 property :bootstrap_server, type: String
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.
- #name ⇒ Object
Attributes included from MintPress::Mixins::Properties
#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root
Instance Method Summary collapse
- #create ⇒ Object
- #delete ⇒ Object
- #describe ⇒ Object
-
#exist? ⇒ Boolean
Alias of exists?.
-
#exists? ⇒ Boolean
Does the Topic exist.
- #get_instance_variables ⇒ Object
-
#harvest ⇒ Object
Harvest config into class properties.
-
#initialize(opts = {}) ⇒ Topic
constructor
A new instance of Topic.
-
#update ⇒ Object
Alter the number of partitions, replica assignment, and/or configuration for the topic.
- #usage ⇒ Object
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