You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ableegoldman (via GitHub)" <gi...@apache.org> on 2023/08/23 21:12:46 UTC
[GitHub] [kafka] ableegoldman commented on a diff in pull request #14149: HOTFIX: avoid placement of unnecessary transient standby tasks
ableegoldman commented on code in PR #14149:
URL: https://github.com/apache/kafka/pull/14149#discussion_r1303547121
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamsPartitionAssignor.java:
##########
@@ -618,18 +618,24 @@ private boolean assignTasksToClients(final Cluster fullMetadata,
final boolean lagComputationSuccessful =
populateClientStatesMap(clientStates, clientMetadataMap, taskForPartition, changelogTopics);
- log.info("{} members participating in this rebalance: \n{}.",
- clientStates.size(),
- clientStates.entrySet().stream()
- .sorted(comparingByKey())
- .map(entry -> entry.getKey() + ": " + entry.getValue().consumers())
- .collect(Collectors.joining(Utils.NL)));
+
+ log.info("{} client nodes and {} consumers participating in this rebalance: \n{}.",
+ clientStates.size(),
+ clientStates.values().stream().map(ClientState::capacity).reduce(Integer::sum),
+ clientStates.entrySet().stream()
+ .sorted(comparingByKey())
+ .map(entry -> entry.getKey() + ": " + entry.getValue().consumers())
+ .collect(Collectors.joining(Utils.NL)));
final Set<TaskId> allTasks = partitionsForTask.keySet();
statefulTasks.addAll(changelogTopics.statefulTaskIds());
- log.debug("Assigning tasks {} including stateful {} to clients {} with number of replicas {}",
- allTasks, statefulTasks, clientStates, numStandbyReplicas());
+ log.info("Assigning stateful tasks: {}\n"
+ + "and stateless tasks: {}",
+ statefulTasks,
+ allTasks.removeAll(statefulTasks));
Review Comment:
ah yeah, my bad, changed to use `stream().filter()` 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