adding sorting parameter (#646)

Co-authored-by: marselakhmetov <makhmetov@provectus.com>
This commit is contained in:
Marsel 2021-07-07 18:50:27 +03:00 committed by GitHub
parent 0ec40dd7e4
commit df1d3bbfc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -142,6 +142,8 @@ public class ClusterService {
return Comparator.comparing(InternalTopic::getPartitionCount); return Comparator.comparing(InternalTopic::getPartitionCount);
case OUT_OF_SYNC_REPLICAS: case OUT_OF_SYNC_REPLICAS:
return Comparator.comparing(t -> t.getReplicas() - t.getInSyncReplicas()); return Comparator.comparing(t -> t.getReplicas() - t.getInSyncReplicas());
case REPLICATION_FACTOR:
return Comparator.comparing(InternalTopic::getReplicationFactor);
case NAME: case NAME:
default: default:
return defaultComparator; return defaultComparator;

View file

@ -1457,6 +1457,7 @@ components:
- NAME - NAME
- OUT_OF_SYNC_REPLICAS - OUT_OF_SYNC_REPLICAS
- TOTAL_PARTITIONS - TOTAL_PARTITIONS
- REPLICATION_FACTOR
Topic: Topic:
type: object type: object