Implemented topics sorting by size (#1539)

Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
This commit is contained in:
ValentinPrischepa 2022-02-09 04:35:33 -08:00 committed by GitHub
parent 772b878d90
commit 529cd0bd6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -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;

View file

@ -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