Class PhysicalClusterMetadata
java.lang.Object
io.confluent.kafka.multitenant.BasePhysicalClusterMetadata<io.confluent.kafka.multitenant.KafkaLogicalClusterMetadata>
io.confluent.kafka.multitenant.PhysicalClusterMetadata
- All Implemented Interfaces:
org.apache.kafka.common.Configurable,org.apache.kafka.common.Reconfigurable,org.apache.kafka.server.multitenant.MultiTenantMetadata
public class PhysicalClusterMetadata
extends io.confluent.kafka.multitenant.BasePhysicalClusterMetadata<io.confluent.kafka.multitenant.KafkaLogicalClusterMetadata>
This holds metadata passed from CCloud related to this physical cluster
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from interface org.apache.kafka.server.multitenant.MultiTenantMetadata
CONFLUENT_ENV_ID -
Constructor Summary
ConstructorsConstructorDescriptionPhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics) PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.common.utils.Time time) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidLoads the cache and starts listening for directory events in directory specified in ConfluentConfigs.MULTITENANT_METADATA_DIR_CONFIG config.booleanisUp()Returns true if cache is loaded and listening for metadata, otherwise returns false.io.confluent.kafka.multitenant.KafkaLogicalClusterMetadataMap<org.apache.kafka.common.Endpoint, CompletableFuture<Void>> start(Map<String, Object> interBrokerClientConfigs, Collection<org.apache.kafka.common.Endpoint> endpoints) voidstartClients(Function<String, org.apache.kafka.clients.admin.Admin> adminClientSupplier) Methods 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
ensureOpen, firstActiveUserLkcMetadata, registerTenantCallback, registerTenantDeactivatedCallback, registerTenantMetadataUpdateCallback
-
Field Details
-
tenantLifecycleManager
-
sslCertificateManager
-
-
Constructor Details
-
PhysicalClusterMetadata
public PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics) -
PhysicalClusterMetadata
public PhysicalClusterMetadata(org.apache.kafka.common.metrics.Metrics metrics, org.apache.kafka.common.utils.Time time)
-
-
Method Details
-
configure
Loads the cache and starts listening for directory events in directory specified in ConfluentConfigs.MULTITENANT_METADATA_DIR_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. In addition to events in the directory, we are scheduling a full reload of the directory every MULTITENANT_METADATA_RELOAD_DELAY_MS to make sure nothing is missed- Parameters:
configs- broker configuration- Throws:
org.apache.kafka.common.config.ConfigException- if KafkaConfig.BrokerSessionUuidProp is not set, or ConfluentConfigs.MULTITENANT_METADATA_DIR_CONFIG is not set.UnsupportedOperationException- if another instance of this class with the same broker session UUID was already configured.
-
close
-
startClients
-
start
public Map<org.apache.kafka.common.Endpoint, CompletableFuture<Void>> start(Map<String, Object> interBrokerClientConfigs, Collection<org.apache.kafka.common.Endpoint> endpoints) -
isUp
public boolean isUp()Returns true if cache is loaded and listening for metadata, otherwise returns false. -
dedicatedLogicalClusterId
-
kafkaLogicalClusterIds
-
logicalClusterIds
-
logicalClusterIdsIncludingStale
-
metadata
- Specified by:
metadatain interfaceorg.apache.kafka.server.multitenant.MultiTenantMetadata- Specified by:
metadatain classio.confluent.kafka.multitenant.BasePhysicalClusterMetadata<io.confluent.kafka.multitenant.KafkaLogicalClusterMetadata>
-