kgusakov commented on code in PR #1799:
URL: https://github.com/apache/ignite-3/pull/1799#discussion_r1146846952
##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -317,4 +321,29 @@ static long extractChangeTriggerRevision(Entry
revisionEntry) {
return INITIAL_TRIGGER_REVISION_VALUE;
}
}
+
+ /**
+ * Finds a zone configuration from zones configuration by its id.
+ *
+ * @param dstZnsCfg Distribution zones config.
+ * @param zoneId Id of zone.
+ * @return Zone configuration with appropriate zone id.
+ */
+ public static DistributionZoneConfiguration
getZoneById(DistributionZonesConfiguration dstZnsCfg, int zoneId) {
+ if (zoneId == DEFAULT_ZONE_ID) {
+ return dstZnsCfg.defaultDistributionZone();
+ }
+
+ for (String name :
dstZnsCfg.distributionZones().value().namedListKeys()) {
Review Comment:
Sorry, maybe sounds stupid, but I can't find these methods)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]