-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-12648: basic skeleton API for NamedTopology #10615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 11 commits
f0015d8
8378ef3
621c71d
0a912b6
470758f
c308b75
bce4fb8
eedc434
0c2f979
a1f0eb7
45f8323
f720d7b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.kafka.streams.processor.internals.namedtopology; | ||
|
|
||
| import org.apache.kafka.streams.KafkaClientSupplier; | ||
| import org.apache.kafka.streams.KafkaStreams; | ||
|
|
||
| import java.util.Properties; | ||
|
|
||
| public class KafkaStreamsNamedTopologyWrapper extends KafkaStreams { | ||
|
|
||
| public KafkaStreamsNamedTopologyWrapper(final NamedTopology topology, final Properties props, final KafkaClientSupplier clientSupplier) { | ||
| super(topology.topology(), props, clientSupplier); | ||
| } | ||
|
|
||
| public NamedTopology getTopologyByName(final String name) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| public void addNamedTopology(final NamedTopology topology) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
|
|
||
| public void removeNamedTopology(final NamedTopology topology) { | ||
| throw new UnsupportedOperationException(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package org.apache.kafka.streams.processor.internals.namedtopology; | ||
|
|
||
| import org.apache.kafka.streams.Topology; | ||
|
|
||
| public class NamedTopology { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would it be possible to add an api to get the topics the NamedTopology depends on directly? It seems that is the only this we care about when it comes to assigning them to stream runtimes right?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yeah, good call. Will do |
||
|
|
||
| private final Topology topology; | ||
| private final String name; | ||
|
|
||
| private NamedTopology(final Topology topology, final String name) { | ||
| this.topology = topology; | ||
| this.name = name; | ||
| } | ||
|
|
||
| public static NamedTopology fromTopologyWithName(final Topology topology, final String name) { | ||
| return new NamedTopology(topology, name); | ||
| } | ||
|
|
||
| public Topology topology() { | ||
| return topology; | ||
| } | ||
|
|
||
| public String name() { | ||
| return name; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I did strip out the protocol change, I left this in since it doesn't affect anything until we actually bump the protocol version (which I did take out of this PR)