Implemented topics sorting by size (#1539)
Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
This commit is contained in:
parent
772b878d90
commit
529cd0bd6e
2 changed files with 3 additions and 0 deletions
|
@ -455,6 +455,8 @@ public class TopicsService {
|
||||||
return Comparator.comparing(t -> t.getReplicas() - t.getInSyncReplicas());
|
return Comparator.comparing(t -> t.getReplicas() - t.getInSyncReplicas());
|
||||||
case REPLICATION_FACTOR:
|
case REPLICATION_FACTOR:
|
||||||
return Comparator.comparing(InternalTopic::getReplicationFactor);
|
return Comparator.comparing(InternalTopic::getReplicationFactor);
|
||||||
|
case SIZE:
|
||||||
|
return Comparator.comparing(InternalTopic::getSegmentSize);
|
||||||
case NAME:
|
case NAME:
|
||||||
default:
|
default:
|
||||||
return defaultComparator;
|
return defaultComparator;
|
||||||
|
|
|
@ -1742,6 +1742,7 @@ components:
|
||||||
- OUT_OF_SYNC_REPLICAS
|
- OUT_OF_SYNC_REPLICAS
|
||||||
- TOTAL_PARTITIONS
|
- TOTAL_PARTITIONS
|
||||||
- REPLICATION_FACTOR
|
- REPLICATION_FACTOR
|
||||||
|
- SIZE
|
||||||
|
|
||||||
SortOrder:
|
SortOrder:
|
||||||
type: string
|
type: string
|
||||||
|
|
Loading…
Add table
Reference in a new issue