You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "apourchet (via GitHub)" <gi...@apache.org> on 2024/06/11 22:56:27 UTC
[PR] KAFKA-15045: (KIP-924 pt. 23) TaskAssignmentUtils minor changes [kafka]
apourchet opened a new pull request, #16294:
URL: https://github.com/apache/kafka/pull/16294
We now provide a way to more easily customize the rack aware optimizations that we provide by way of a configuration class called RackAwareOptimizationParams.
We also simplified the APIs for the optimizeXYZ utility functions since they were mutating the inputs anyway.
### 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-15045: (KIP-924 pt. 22) Add RackAwareOptimizationParams and other minor TaskAssignmentUtils changes [kafka]
Posted by "ableegoldman (via GitHub)" <gi...@apache.org>.
ableegoldman commented on PR #16294:
URL: https://github.com/apache/kafka/pull/16294#issuecomment-2162088243
Merged to trunk and cherrypicked to 3.8
--
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-15045: (KIP-924 pt. 23) TaskAssignmentUtils minor changes [kafka]
Posted by "ableegoldman (via GitHub)" <gi...@apache.org>.
ableegoldman commented on code in PR #16294:
URL: https://github.com/apache/kafka/pull/16294#discussion_r1635794717
##########
streams/src/main/java/org/apache/kafka/streams/processor/assignment/TaskAssignmentUtils.java:
##########
@@ -55,7 +56,103 @@ public final class TaskAssignmentUtils {
private TaskAssignmentUtils() {}
/**
- * Return an {@code AssignmentError} for a task assignment created for an application.
+ * A simple config container for necessary parameters and optional overrides to apply when
+ * running the active or standby task rack-aware optimizations.
+ */
+ public static class RackAwareOptimizationParams {
Review Comment:
nit: make this final
##########
streams/src/main/java/org/apache/kafka/streams/processor/assignment/TaskAssignmentUtils.java:
##########
@@ -55,7 +56,103 @@ public final class TaskAssignmentUtils {
private TaskAssignmentUtils() {}
/**
- * Return an {@code AssignmentError} for a task assignment created for an application.
+ * A simple config container for necessary parameters and optional overrides to apply when
+ * running the active or standby task rack-aware optimizations.
+ */
+ public static class RackAwareOptimizationParams {
+ private final ApplicationState applicationState;
+ private final Optional<Integer> trafficCostOverride;
+ private final Optional<Integer> nonOverlapCostOverride;
+ private final Optional<SortedSet<TaskId>> tasksToOptimize;
+
+ private RackAwareOptimizationParams(final ApplicationState applicationState,
+ final Optional<Integer> trafficCostOverride,
+ final Optional<Integer> nonOverlapCostOverride,
+ final Optional<SortedSet<TaskId>> tasksToOptimize) {
Review Comment:
nit: indentation is off by one space I think?
--
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-15045: (KIP-924 pt. 23) TaskAssignmentUtils minor changes [kafka]
Posted by "ableegoldman (via GitHub)" <gi...@apache.org>.
ableegoldman merged PR #16294:
URL: https://github.com/apache/kafka/pull/16294
--
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