[
https://issues.apache.org/jira/browse/SAMZA-2612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17251085#comment-17251085
]
Stuart Perks commented on SAMZA-2612:
-------------------------------------
It looks like the inputDescriptor has the withPhysicalName(name) which can
overcome this testing it out.
Ref from [wiki example
|https://github.com/apache/samza-hello-samza/blob/master/src/main/java/samza/examples/wikipedia/system/descriptors/WikipediaInputDescriptor.java]
> Kafka Topic naming convention is not fully valid with Stream Descriptor
> StreamId
> --------------------------------------------------------------------------------
>
> Key: SAMZA-2612
> URL: https://issues.apache.org/jira/browse/SAMZA-2612
> Project: Samza
> Issue Type: Bug
> Reporter: Stuart Perks
> Priority: Major
>
> The StreamDescriptor class cannot accept all acceptable formats for Kafka
> Topic names.
> StreamDescriptor
> {code:java}
> private static final Pattern STREAM_ID_PATTERN =
> Pattern.compile("[\\d\\w-_]+");
> {code}
> Kafka Topic Validation
> {code:java}
> public static final String LEGAL_CHARS = "[a-zA-Z0-9._-]";
> {code}
> Taking the example this is valid
> {code:java}
> KafkaInputDescriptor<PageView> pageViewStreamDescriptor =
> kafkaSystemDescriptor.getInputDescriptor("page-view-topic", new
> JsonSerdeV2<>(PageView.class));
> {code}
> but this is not if we use the name page.view.topic
> {code:java}
> KafkaInputDescriptor<PageView> pageViewStreamDescriptor =
> kafkaSystemDescriptor.getInputDescriptor("page.view.topic", new
> JsonSerdeV2<>(PageView.class));
> {code}
> [Stream Descriptor
> Validation|https://github.com/apache/samza/blob/master/samza-api/src/main/java/org/apache/samza/system/descriptors/StreamDescriptor.java#L48]
> [Kafka Topic
> Validation|https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/internals/Topic.java#L29]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)