Fix code style in internalConsumerGroup
* Cast the result directly to int instead of using Integer.valueof method Signed-off-by: nisanohana3 <nisana230@gmail.com>
This commit is contained in:
parent
7365cfe394
commit
0e7f141abe
1 changed files with 1 additions and 3 deletions
|
@ -74,14 +74,12 @@ public class InternalConsumerGroup {
|
|||
|
||||
private static Integer calculateTopicNum(Map<TopicPartition, Long> offsets, Collection<InternalMember> members) {
|
||||
|
||||
long topicNum = Stream.concat(
|
||||
return (int) Stream.concat(
|
||||
offsets.keySet().stream().map(TopicPartition::topic),
|
||||
members.stream()
|
||||
.flatMap(m -> m.getAssignment().stream().map(TopicPartition::topic))
|
||||
).distinct().count();
|
||||
|
||||
return Integer.valueOf((int) topicNum);
|
||||
|
||||
}
|
||||
|
||||
private static Collection<InternalMember> initInternalMembers(ConsumerGroupDescription description) {
|
||||
|
|
Loading…
Add table
Reference in a new issue