You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "DL1231 (via GitHub)" <gi...@apache.org> on 2025/06/25 01:08:54 UTC
[PR] MINOR: Clean up in ReassignPartitionsCommandTest [kafka]
DL1231 opened a new pull request, #20035:
URL: https://github.com/apache/kafka/pull/20035
see https://github.com/apache/kafka/pull/20003#discussion_r2164659673
Replace `SimpleImmutableEntry` by `Map.entry`.
--
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: Clean up in ReassignPartitionsCommandTest [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on PR #20035:
URL: https://github.com/apache/kafka/pull/20035#issuecomment-3006157367
@DL1231 could you please cleanup `ReassignPartitionsCommand` too?
--
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: Clean up in ReassignPartitionsCommandTest [kafka]
Posted by "Yunyung (via GitHub)" <gi...@apache.org>.
Yunyung commented on code in PR #20035:
URL: https://github.com/apache/kafka/pull/20035#discussion_r2166131960
##########
tools/src/test/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommandTest.java:
##########
@@ -445,24 +439,24 @@ public void testAlterLogDirReassignmentThrottle() throws Exception {
produceMessages(topicPartition.topic(), topicPartition.partition(), 700);
int targetBrokerId = 0;
- List<Integer> replicas = asList(0, 1, 2);
+ List<Integer> replicas = List.of(0, 1, 2);
LogDirReassignment reassignment = buildLogDirReassignment(topicPartition, targetBrokerId, replicas);
// Start the replica move with a low throttle so it does not complete
long initialLogDirThrottle = 1L;
runExecuteAssignment(false, reassignment.json, -1L, initialLogDirThrottle);
- try (Admin admin = Admin.create(Collections.singletonMap(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, clusterInstance.bootstrapServers()))) {
- waitForLogDirThrottle(admin, new HashSet<>(singletonList(0)), initialLogDirThrottle);
+ try (Admin admin = Admin.create(Map.of(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, clusterInstance.bootstrapServers()))) {
+ waitForLogDirThrottle(admin, new HashSet<>(List.of(0)), initialLogDirThrottle);
Review Comment:
```suggestion
waitForLogDirThrottle(admin, Set.of(0), initialLogDirThrottle);
```
##########
tools/src/test/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommandTest.java:
##########
@@ -804,9 +798,9 @@ private void testCancellationAction(boolean useBootstrapServer) throws Interrupt
* Remove a set of throttled partitions and reset the overall replication quota.
*/
private void removeReplicationThrottleForPartitions(TopicPartition part) {
- try (Admin admin = Admin.create(Collections.singletonMap(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, clusterInstance.bootstrapServers()))) {
- removePartitionReplicaThrottles(admin, new HashSet<>(singleton(part)));
- assertDoesNotThrow(() -> throttleAllBrokersReplication(admin, asList(0, 1, 2, 3), Integer.MAX_VALUE));
+ try (Admin admin = Admin.create(Map.of(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, clusterInstance.bootstrapServers()))) {
+ removePartitionReplicaThrottles(admin, new HashSet<>(Set.of(part)));
Review Comment:
```suggestion
removePartitionReplicaThrottles(admin, Set.of(part));
```
--
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