Skip to content

[Bug report] Gravitino Kafka implementation doesn't support '.' symbol in topic name. #9926

@kbalitskiy

Description

@kbalitskiy

Version

main branch

Describe what's wrong

Why Gravitino disallows '.' in Kafka topic name?
This not restricted in Kafka.
While it still can "see" the topics with dot, but doesn't allow to change them or create new topics with '.' symbol.
I couldn't find any RFC for that, but still, here are Confluence recomendations.
Let's not break standarts, guys. If it's allowed in Kafka, then it should be supported, isn't it?

Error message and/or stacktrace

kbalitskii@ma2-dev-gravitino02 ~ $ curl -L 'http://localhost:8090/api/metalakes/ma2_dev/catalogs/ma2-dev-kafka-plaintext/schemas/default/topics' \

-H 'Content-Type: application/json'
-H 'Accept: application/vnd.gravitino.v1+json'
-d '{
"name": "ma2.KirillBalitskiiTest",
"comment": "This is a topic",
"properties": {
"partition-count": "1",
"replication-factor": "3"
}
}'
{"code":1001,"type":"IllegalArgumentException","message":"Failed to operate topic(s) [ma2.KirillBalitskiiTest] operation [CREATE] under schema [default], reason [The TOPIC name 'ma2.KirillBalitskiiTest' is illegal. Illegal name: ma2.KirillBalitskiiTest]","stack":["java.lang.IllegalArgumentException: The TOPIC name 'ma2.KirillBalitskiiTest' is illegal. Illegal name: ma2.KirillBalitskiiTest","\tat com.google.common.base.Preconditions.checkArgument(Preconditions.java:143)","\tat org.apache.gravitino.catalog.CapabilityHelpers.applyNameSpecification(CapabilityHelpers.java:507)","\tat

How to reproduce

Just try to create a Kafka topic with dot in it's name.

Additional context

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions