-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added segmentSize for topic level #48
Conversation
@@ -44,7 +42,8 @@ | |||
ac -> getClusterMetrics(ac).flatMap( clusterMetrics -> | |||
getTopicsData(ac).flatMap( topics -> | |||
loadTopicsConfig(ac, topics.stream().map(InternalTopic::getName).collect(Collectors.toList())) | |||
.map( configs -> mergeWithConfigs(topics, configs) ) | |||
.map( configs -> mergeWithConfigs(topics, configs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we collect replication data before and merge it with topics/configs?
private Mono<Map<String, InternalTopic>> updateSegmentSize(AdminClient ac, InternalClusterMetrics clusterMetrics, Map<String, InternalTopic> internalTopic) { | ||
return ClusterUtil.toMono(ac.describeLogDirs(clusterMetrics.getBrokersIds()).all()) | ||
.map(l -> { | ||
System.out.println(l); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please clean up code
@@ -20,6 +20,6 @@ | |||
private final int replicationFactor; | |||
private final int underReplicatedPartitions; | |||
//TODO: find way to fill | |||
private final int segmentSize; | |||
private final long segmentSize; | |||
private final int segmentCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove count int this case
@@ -22,4 +24,5 @@ | |||
//TODO: find way to fill | |||
private final int segmentSize; | |||
private final int segmentCount; | |||
private final List<Integer> brokersIds; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why brokerIds appeared in metrics?
… added partition collecting in topic
* Added segmentSize for topic level * Added segmentSize to clusterMetrics object * Added internalClusterState for storing clusterMetrics linked to cluster's brokersIds * InternalBrokersMetrics param added to InternalClusterMetrics * Changed topic segment counting logic by finding the partition leader, added partition collecting in topic * Added segmentSize info to cluster, broker, topic and topicPartition level * Reduce to map moved to clusterutil, leader moved in cache * Cleared some code Co-authored-by: Roman Nedzvetskiy <roman@Romans-MacBook-Pro.local>
No description provided.