Class CommonTopicBasedPhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>
java.lang.Object
io.confluent.kafka.multitenant.BasePhysicalClusterMetadata<LCMType>
io.confluent.kafka.multitenant.CommonTopicBasedPhysicalClusterMetadata<LCMType>
- All Implemented Interfaces:
org.apache.kafka.common.Configurable,org.apache.kafka.common.Reconfigurable,org.apache.kafka.server.multitenant.MultiTenantMetadata
public abstract class CommonTopicBasedPhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>
extends BasePhysicalClusterMetadata<LCMType>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.apache.kafka.server.multitenant.MultiTenantMetadata
CONFLUENT_ENV_ID -
Constructor Summary
ConstructorsConstructorDescriptionCommonTopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics) CommonTopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.common.utils.Time time) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidCreates a consumer for the LC metadata topic (named in the ConfluentConfigs.CDC_LC_METADATA_TOPIC_CONFIG config.) Adds the instance for the given broker session UUID, specified in KafkaConfig.BrokerSessionUuidProp to the static instance map.voidReturns all active logical clusters hosted by this physical cluster, including logical clusters with stale/invalid metadataReturns metadata LCMType of a given logical cluster IDMethods inherited from class io.confluent.kafka.multitenant.BasePhysicalClusterMetadata
getInstance, reconfigurableConfigs, reconfigure, validateReconfigurationMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.server.multitenant.MultiTenantMetadata
dedicatedLogicalClusterId, ensureOpen, firstActiveUserLkcMetadata, isUp, kafkaLogicalClusterIds, registerTenantCallback, registerTenantDeactivatedCallback, registerTenantMetadataUpdateCallback, start, startClients
-
Field Details
-
NUMBER_OF_TENANTS_METRIC_NAME
- See Also:
-
NUMBER_OF_NON_HC_TENANTS_METRIC_NAME
- See Also:
-
-
Constructor Details
-
CommonTopicBasedPhysicalClusterMetadata
public CommonTopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics) -
CommonTopicBasedPhysicalClusterMetadata
public CommonTopicBasedPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.common.utils.Time time)
-
-
Method Details
-
configure
Creates a consumer for the LC metadata topic (named in the ConfluentConfigs.CDC_LC_METADATA_TOPIC_CONFIG config.) Adds the instance for the given broker session UUID, specified in KafkaConfig.BrokerSessionUuidProp to the static instance map. The caller of this method must call close() when done to remove the instance from the static map.- Parameters:
configs- broker configuration- Throws:
org.apache.kafka.common.config.ConfigException- if KafkaConfig.BrokerSessionUuidProp is not set, or ConfluentConfigs.CDC_LC_METADATA_TOPIC_CONFIG is not set, or ConfluentConfigs.CDC_TOPIC_LOAD_TIMEOUT_MS_CONFIG is not set, or unable to monitor the SSL certificates on disk.UnsupportedOperationException- if another instance of this class with the same broker session UUID was already configured.
-
close
-
start
-
logicalClusterIds
-
logicalClusterIdsIncludingStale
Description copied from class:BasePhysicalClusterMetadataReturns all active logical clusters hosted by this physical cluster, including logical clusters with stale/invalid metadata- Specified by:
logicalClusterIdsIncludingStalein classBasePhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>- Returns:
- set of logical cluster IDs
-
metadata
Description copied from class:BasePhysicalClusterMetadataReturns metadata LCMType of a given logical cluster ID- Specified by:
metadatain interfaceorg.apache.kafka.server.multitenant.MultiTenantMetadata- Specified by:
metadatain classBasePhysicalClusterMetadata<LCMType extends org.apache.kafka.server.multitenant.LogicalClusterMetadata>- Parameters:
logicalClusterId- logical cluster ID- Returns:
- logical cluster metadata LCMType or null if logical cluster does not exist or its metadata is stale
-
consume
-