You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "brandboat (via GitHub)" <gi...@apache.org> on 2024/07/21 08:23:22 UTC
[PR] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
brandboat opened a new pull request, #16644:
URL: https://github.com/apache/kafka/pull/16644
related to https://issues.apache.org/jira/browse/KAFKA-17038,
This is a follow-up after [KIP-919](https://cwiki.apache.org/confluence/display/KAFKA/KIP-919%3A+Allow+AdminClient+to+Talk+Directly+with+the+KRaft+Controller+Quorum+and+add+Controller+Registration), extending support for `BOOTSTRAP_CONTROLLERS_CONFIG` to both `Admin#alterPartitionReassignments` and `Admin#listPartitionReassignments`.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #16644:
URL: https://github.com/apache/kafka/pull/16644
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "frankvicky (via GitHub)" <gi...@apache.org>.
frankvicky commented on code in PR #16644:
URL: https://github.com/apache/kafka/pull/16644#discussion_r1691286374
##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -2714,6 +2714,56 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest {
ConfigSource.DYNAMIC_TOPIC_CONFIG, false, false, Collections.emptyList(), null, null),
topicConfigs.get(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG))
}
+
+ @ParameterizedTest
+ @ValueSource(strings = Array("kraft"))
+ def testAlterReassignmentsWithBootstrapControllers(quorum: String): Unit = {
+ client = Admin.create(createConfig)
+ val assignments = new util.HashMap[Integer, util.List[Integer]]
+ assignments.put(0, util.Arrays.asList(0, 1, 2))
+ assignments.put(1, util.Arrays.asList(1, 2, 0))
+ assignments.put(2, util.Arrays.asList(2, 1, 0))
+ val createTopicResult = client.createTopics(Collections.singletonList(new NewTopic("foo", assignments)))
Review Comment:
nit: Maybe we could consider extracting foo as a variable? It could improve readability and prevent accidental changes.
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "brandboat (via GitHub)" <gi...@apache.org>.
brandboat commented on code in PR #16644:
URL: https://github.com/apache/kafka/pull/16644#discussion_r1697747738
##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -2714,6 +2714,56 @@ class PlaintextAdminIntegrationTest extends BaseAdminIntegrationTest {
ConfigSource.DYNAMIC_TOPIC_CONFIG, false, false, Collections.emptyList(), null, null),
topicConfigs.get(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG))
}
+
+ @ParameterizedTest
+ @ValueSource(strings = Array("kraft"))
+ def testAlterReassignmentsWithBootstrapControllers(quorum: String): Unit = {
+ client = Admin.create(createConfig)
+ val assignments = new util.HashMap[Integer, util.List[Integer]]
+ assignments.put(0, util.Arrays.asList(0, 1, 2))
+ assignments.put(1, util.Arrays.asList(1, 2, 0))
+ assignments.put(2, util.Arrays.asList(2, 1, 0))
+ val createTopicResult = client.createTopics(Collections.singletonList(new NewTopic("foo", assignments)))
Review Comment:
Sure, I'will address this after moving the the whole test cases to `BootstrapControllersIntegrationTest`, thanks
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16644:
URL: https://github.com/apache/kafka/pull/16644#issuecomment-2282912631
@brandboat could you please rebase code to fix conflicts?
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16644:
URL: https://github.com/apache/kafka/pull/16644#issuecomment-2259256061
@brandboat Could you please move the tests into `BootstrapControllersIntegrationTest`?
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #16644:
URL: https://github.com/apache/kafka/pull/16644#discussion_r1721032433
##########
core/src/test/java/kafka/test/server/BootstrapControllersIntegrationTest.java:
##########
@@ -235,4 +246,55 @@ private void testIncrementalAlterConfigs(ClusterInstance clusterInstance, boolea
});
}
}
+
+ @ClusterTest
+ public void testAlterReassignmentsWithBootstrapControllers(ClusterInstance clusterInstance) throws ExecutionException, InterruptedException {
+ String topicName = "foo";
+ try (Admin admin = Admin.create(adminConfig(clusterInstance, false))) {
+ Map<Integer, List<Integer>> assignments = new HashMap<>();
+ assignments.put(0, Arrays.asList(0, 1, 2));
Review Comment:
this manual assignments requires "3" brokers, but the test starts with only one broker, right?
--
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] KAFKA-17038 KIP-919 supports for `alterPartitionReassignments` and `listPartitionReassignments` [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #16644:
URL: https://github.com/apache/kafka/pull/16644#issuecomment-2297611826
@brandboat could you please rebase code? there are many failed tests but I assume they are unconnected to this PR
--
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