Interface OdysseyManager
- All Superinterfaces:
AutoCloseable, OdysseyReadManager
- All Known Implementing Classes:
OdysseyIntegrationManager
Extends OdysseyReadManager with write operations (CreateTopics, DeleteTopics).
Controller servers depend on this interface; broker servers depend only on
OdysseyReadManager.
All methods extract the namespace internally from the principal.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA resource's association payloads that the request carried as tagged bytes rather than as inline config values, because they exceed the limit the protocol can encode in a string field. -
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<org.apache.kafka.common.message.CreateTopicsResponseData> handleCreateTopicsWithOdyssey(org.apache.kafka.common.requests.CreateTopicsRequest request, BiFunction<org.apache.kafka.common.message.CreateTopicsRequestData, Set<String>, CompletableFuture<org.apache.kafka.common.message.CreateTopicsResponseData>> topicCreator, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Handles CreateTopics requests with Odyssey integration for K1.handleDeleteTopicsWithOdyssey(Map<String, org.apache.kafka.common.Uuid> nameToId, Set<String> topicsWithAssociations, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Handles DeleteTopics requests with Odyssey integration for K1.handleIncrementalAlterConfigsWithOdyssey(Map<org.apache.kafka.common.config.ConfigResource, Map<String, Map.Entry<org.apache.kafka.clients.admin.AlterConfigOp.OpType, String>>> configChanges, Map<org.apache.kafka.common.config.ConfigResource, OdysseyManager.LargeAssociationPayloads> largePayloads, org.apache.kafka.common.security.auth.KafkaPrincipal principal, boolean validateOnly, ControllerConfigUpdater controllerConfigUpdater, Consumer<Map<org.apache.kafka.common.config.ConfigResource, org.apache.kafka.common.requests.ApiError>> responseDataUpdater, ExternalSchemaUpdater externalSchemaUpdater) Handles IncrementalAlterConfigs requests with Odyssey integration for K1.voidnotifyDeleteTopicsResult(Set<org.apache.kafka.common.Uuid> associationDeletedTopicIds, Map<org.apache.kafka.common.Uuid, org.apache.kafka.common.requests.ApiError> idToError) Reports per-topic results from the post-Odyssey Kafka delete so SR-committed-but-Kafka-failed topics — the orphan-event boundary — can be observed.Methods inherited from interface AutoCloseable
closeMethods inherited from interface OdysseyReadManager
handleDescribeConfigsWithOdyssey
-
Method Details
-
handleCreateTopicsWithOdyssey
CompletableFuture<org.apache.kafka.common.message.CreateTopicsResponseData> handleCreateTopicsWithOdyssey(org.apache.kafka.common.requests.CreateTopicsRequest request, BiFunction<org.apache.kafka.common.message.CreateTopicsRequestData, Set<String>, CompletableFuture<org.apache.kafka.common.message.CreateTopicsResponseData>> topicCreator, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Handles CreateTopics requests with Odyssey integration for K1.- Parameters:
request- the CreateTopics request, holding only authorized topicstopicCreator- creates the given topics; its second argument names the subset whose external-schema type the same create operation must set to MAYBEprincipal- the request principal for namespace extraction and token acquisition- Returns:
- CompletableFuture with the complete response
-
handleDeleteTopicsWithOdyssey
CompletableFuture<List<DeleteResult>> handleDeleteTopicsWithOdyssey(Map<String, org.apache.kafka.common.Uuid> nameToId, Set<String> topicsWithAssociations, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Handles DeleteTopics requests with Odyssey integration for K1. The caller has already authorized each topic and resolved its UUID.topicsWithAssociationsis the caller's classification of which topics may carry a Schema Registry association; this method does not classify. A superset is safe — those topics just pay a no-op SR call — but a subset orphans associations, since the topic is deleted right afterwards.Returns one
DeleteResultper input topic, innameToIditeration order. -
handleIncrementalAlterConfigsWithOdyssey
CompletableFuture<Void> handleIncrementalAlterConfigsWithOdyssey(Map<org.apache.kafka.common.config.ConfigResource, Map<String, Map.Entry<org.apache.kafka.clients.admin.AlterConfigOp.OpType, String>>> configChanges, Map<org.apache.kafka.common.config.ConfigResource, OdysseyManager.LargeAssociationPayloads> largePayloads, org.apache.kafka.common.security.auth.KafkaPrincipal principal, boolean validateOnly, ControllerConfigUpdater controllerConfigUpdater, Consumer<Map<org.apache.kafka.common.config.ConfigResource, org.apache.kafka.common.requests.ApiError>> responseDataUpdater, ExternalSchemaUpdater externalSchemaUpdater) Handles IncrementalAlterConfigs requests with Odyssey integration for K1.SET ops upsert associations to SR; DELETE ops disassociate them. Non-Odyssey resources bypass the SR flow and go directly to the controller. Every per-resource result — illegal rejection, validation failure, SR-resolution failure, controller result, SR-upsert result — is delivered through
responseDataUpdater, which is the sole channel for response writes and handles any caller-side translation (e.g. cluster link name mapping).When
validateOnlyistrue, SR dry-run validation still runs, the controller call still runs (passed-throughvalidateOnlyby the caller's lambda), but the real SR upsert (updateAssociations) is skipped — no schema-association state changes in SR. Mirrors the CreateTopics-with-Odyssey behavior.- Parameters:
configChanges- preprocessed config changes per resource, keyed by op typelargePayloads- association payloads the request delivered as tagged bytes, per resource; resolved intoconfigChangesbefore classificationprincipal- the request principal for namespace extraction and token acquisitionvalidateOnly- if true, skip real SR upsert (dry-run validation still runs)controllerConfigUpdater- callback to apply config changes via the controller (Odyssey configs stripped); receivesvalidateOnlyexplicitly so the controller call honours the same flagresponseDataUpdater- consumer that receives each per-resource result (resource → ApiError) and writes it into the caller's response with any required translationexternalSchemaUpdater-ExternalSchemaUpdater, invoked between the controller alter and the SR upsert- Returns:
- CompletableFuture that completes after the final
responseDataUpdaterinvocation; on failure, completes exceptionally with the error
-
notifyDeleteTopicsResult
void notifyDeleteTopicsResult(Set<org.apache.kafka.common.Uuid> associationDeletedTopicIds, Map<org.apache.kafka.common.Uuid, org.apache.kafka.common.requests.ApiError> idToError) Reports per-topic results from the post-Odyssey Kafka delete so SR-committed-but-Kafka-failed topics — the orphan-event boundary — can be observed.- Parameters:
associationDeletedTopicIds- topics whose SR association was actually removed this request; the only orphan candidates. Callers must exclude bypass-SR (no-association) topics.idToError- per-topic Kafka delete outcomes
-