You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chirag-wadhwa5 (via GitHub)" <gi...@apache.org> on 2026/02/10 04:52:44 UTC

[PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

chirag-wadhwa5 opened a new pull request, #21440:
URL: https://github.com/apache/kafka/pull/21440

   This PR moves PartitionMetadataClient to server-common so it can be reused across multiple components.
   The change improves modularity, avoids duplication, and makes these clients accessible from all required call sites without tight coupling.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "chirag-wadhwa5 (via GitHub)" <gi...@apache.org>.
chirag-wadhwa5 commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2796843517


##########
server/src/main/java/org/apache/kafka/server/NetworkPartitionMetadataClient.java:
##########
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.kafka.coordinator.group;
+package org.apache.kafka.server;

Review Comment:
   Ohh ok, my bad. I have made that change in the latest commit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "squah-confluent (via GitHub)" <gi...@apache.org>.
squah-confluent commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2792837547


##########
server/src/main/java/org/apache/kafka/server/NetworkPartitionMetadataClient.java:
##########
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.kafka.coordinator.group;
+package org.apache.kafka.server;

Review Comment:
   I meant the package within `server`, not the module.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2786375682


##########
server/src/main/java/org/apache/kafka/server/NetworkPartitionMetadataClient.java:
##########
@@ -54,7 +54,7 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Supplier;
 
-public class NetworkPartitionMetadataClient implements PartitionMetadataClient {
+public class NetworkPartitionMetadataClient implements org.apache.kafka.server.util.PartitionMetadataClient {

Review Comment:
   could we remove the fqcn class name?



##########
server/src/test/java/org/apache/kafka/server/NetworkPartitionMetadataClientTest.java:
##########
@@ -177,14 +177,14 @@ public void testListLatestOffsetsSuccess() throws ExecutionException, Interrupte
         Set<TopicPartition> partitions = new HashSet<>();
         partitions.add(tp);
 
-        Map<TopicPartition, CompletableFuture<PartitionMetadataClient.OffsetResponse>> futures =
+        Map<TopicPartition, CompletableFuture<org.apache.kafka.server.util.PartitionMetadataClient.OffsetResponse>> futures =

Review Comment:
   same as above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2786375682


##########
server/src/main/java/org/apache/kafka/server/NetworkPartitionMetadataClient.java:
##########
@@ -54,7 +54,7 @@
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Supplier;
 
-public class NetworkPartitionMetadataClient implements PartitionMetadataClient {
+public class NetworkPartitionMetadataClient implements org.apache.kafka.server.util.PartitionMetadataClient {

Review Comment:
   could we remove the fqcn in favor of just the class name?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "smjn (via GitHub)" <gi...@apache.org>.
smjn commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2786376707


##########
server/src/test/java/org/apache/kafka/server/NetworkPartitionMetadataClientTest.java:
##########
@@ -177,14 +177,14 @@ public void testListLatestOffsetsSuccess() throws ExecutionException, Interrupte
         Set<TopicPartition> partitions = new HashSet<>();
         partitions.add(tp);
 
-        Map<TopicPartition, CompletableFuture<PartitionMetadataClient.OffsetResponse>> futures =
+        Map<TopicPartition, CompletableFuture<org.apache.kafka.server.util.PartitionMetadataClient.OffsetResponse>> futures =
             networkPartitionMetadataClient.listLatestOffsets(partitions);
 
         assertNotNull(futures);
         assertEquals(1, futures.size());
         assertTrue(futures.containsKey(tp));
 
-        PartitionMetadataClient.OffsetResponse response = futures.get(tp).get();
+        org.apache.kafka.server.util.PartitionMetadataClient.OffsetResponse response = futures.get(tp).get();

Review Comment:
   here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "squah-confluent (via GitHub)" <gi...@apache.org>.
squah-confluent commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2790041946


##########
server/src/main/java/org/apache/kafka/server/NetworkPartitionMetadataClient.java:
##########
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.kafka.coordinator.group;
+package org.apache.kafka.server;

Review Comment:
   Shall we also put this in `org.apache.kafka.server.util`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "apoorvmittal10 (via GitHub)" <gi...@apache.org>.
apoorvmittal10 merged PR #21440:
URL: https://github.com/apache/kafka/pull/21440


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] MINOR-restructuring: Relocated PartitionMetadataClient to server-common [kafka]

Posted by "chirag-wadhwa5 (via GitHub)" <gi...@apache.org>.
chirag-wadhwa5 commented on code in PR #21440:
URL: https://github.com/apache/kafka/pull/21440#discussion_r2791411843


##########
server/src/main/java/org/apache/kafka/server/NetworkPartitionMetadataClient.java:
##########
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.kafka.coordinator.group;
+package org.apache.kafka.server;

Review Comment:
   Thanks for the review. `NetworkPartitionMetadataClient` uses `MetadataCache` which is present in the `metadata` module. Since `server-common` is already a dependency of `metadata`, moving `NetworkPartitionMetadataClient` would create a cyclic dependency. That's why `NetworkPartitionMetadataClient` was moved to the `server` module instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org