MINOR: prefix topics if internal config is set#11611
MINOR: prefix topics if internal config is set#11611guozhangwang merged 3 commits intoapache:trunkfrom wcarlson5:prefix_topics
Conversation
|
@ableegoldman This should make it so we can have topics prefixed with whatever is needed |
guozhangwang
left a comment
There was a problem hiding this comment.
@wcarlson5 just for my understanding: what prefix we would use in practice, in order to allow the topology to be moved between runtimes?
| public static final String IQ_CONSISTENCY_OFFSET_VECTOR_ENABLED = "__iq.consistency.offset" | ||
| + ".vector.enabled__"; | ||
|
|
||
| // Private API used to control the usage of consistency offset vectors |
There was a problem hiding this comment.
This comment seems irrelevant? It's not for the offset vectors right?
| } | ||
|
|
||
| private void initInternal(final InternalProcessorContext<?, ?> context) { | ||
| final String prefix = StreamsConfig.InternalConfig.getString( |
There was a problem hiding this comment.
Could we use ProcessorContextUtils#changelogFor here as well? Ditto below
There was a problem hiding this comment.
It could either be a StateStoreContext of a ProcessorContext and there are different methods for each. I am not sure why as they seem to do similar things. but I didn't want to make reaching changes here. I can just file a ticket to consolidate those methods into one maybe?
There was a problem hiding this comment.
In the future we would remove the deprecated init(final ProcessorContext context, final StateStore root) and then we only need ProcessorContextUtils#changelogFor(StateStoreContext..).
Sounds good for filing a JIRA for consolidating to the changelogFor, we can do that when we remove the deprecated init function.
There was a problem hiding this comment.
|
Though this comment is not for AK, I'd have to raise to our attention: in ksql we have hard-coded rules to detect internal topics to be cleaned when terminating a query, which is like this today: With this change we have to remember updating this function otherwise the cleanup logic would break. |
|
@guozhangwang yes that is a good point. When we go to use this we will have to set the config and we can updated the clean up logic then |
|
LGTM! Re-triggering the jenkins tests. |
|
@wcarlson5 could you double check if the failed tests are relevant? |
|
@guozhangwang Yeah I needed update a few tests. It should be good now. |
In order to move a topology to another runtime without having to copy over the internal topics it would be good to have the option to not prefix the internal topics with the application ID. So this change will introduce a new config that if set will be the internal topic prefix
Committer Checklist (excluded from commit message)