sergeyuttsel commented on code in PR #1729:
URL: https://github.com/apache/ignite-3/pull/1729#discussion_r1131486759


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZonesUtil.java:
##########
@@ -266,4 +305,32 @@ public static Map<String, Integer> 
toDataNodesMap(Set<String> dataNodes) {
 
         return dataNodesMap;
     }
+
+    /**
+     * Utility method to check if one byte array starts with a specified 
sequence
+     * of bytes.
+     *
+     * @param array The array to check.
+     * @param prefix The prefix bytes to test for.
+     * @return {@code true} if the array starts with the bytes from the prefix.
+     */
+    public static boolean startsWith(byte[] array, byte[] prefix) {

Review Comment:
   Thanks, fixed.



##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -480,6 +625,152 @@ public int getZoneId(String name) {
         }
     }
 
+    /**
+     * The method for obtaining data nodes of the specified zone. If the 
dataNodesAutoAdjustScaleUp or dataNodesAutoAdjustScaleDown
+     * equals to 0 then returned completable future will be completed when 
data nodes will be saved to the meta storage.
+     *
+     * @param zoneId Zone id.
+     * @param topVer Topology version.
+     * @return The data nodes future.
+     */
+    public CompletableFuture<Set<String>> getDataNodes(int zoneId, long 
topVer) {

Review Comment:
   I rework this code and add comments.



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

Reply via email to