Skip to content
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

Merged
merged 10 commits into from
May 28, 2020
Merged

Conversation

yazebochan
Copy link
Contributor

No description provided.

@@ -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))
Copy link
Contributor

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);
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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?

@yazebochan yazebochan requested a review from apetrovs May 26, 2020 11:04
@yazebochan yazebochan merged commit 9a5ffc9 into master May 28, 2020
@yazebochan yazebochan deleted the backend-segment-metrics branch May 28, 2020 10:11
javalover123 pushed a commit to javalover123/kafka-ui that referenced this pull request Dec 7, 2022
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants