[
https://issues.apache.org/jira/browse/SAMZA-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13829167#comment-13829167
]
Garry Turkington commented on SAMZA-77:
---------------------------------------
Chris -- sure, uniformity is a good thing(TM).
One thing though, in KafkaSystemConsumer this occurs in an argument to a
primary constructor not used elsewhere. So to make it testable I'd have to
make the argument a val, i.e.:
val clientId: String = "undefined-client-id-%s" format
UUID.randomUUID.toString,
I'm kinda knocking the rust off my Scala here so not sure if there's a
stylistically better/more idiomatic way of doing this?
> ClientUtils: random client id isn't actually random
> ---------------------------------------------------
>
> Key: SAMZA-77
> URL: https://issues.apache.org/jira/browse/SAMZA-77
> Project: Samza
> Issue Type: Bug
> Components: kafka
> Affects Versions: 0.6.0
> Reporter: Jakob Homan
> Labels: newbie
> Fix For: 0.7.0
>
> Attachments: samza-77_v1.patch
>
>
> ClientUtils:94
> {code}
> def getKafkaSystemProducerConfig(
> systemName: String,
> clientId: String = "undefined-samza-producer-" format
> UUID.randomUUID.toString,{code}
> attempts to create a random kafka client but because there's no {{%s}} to
> interpolate the random UUID, the string is actually the same and the format
> call is actually a no-op. Need that {{%s}}
--
This message was sent by Atlassian JIRA
(v6.1#6144)