alievmirza commented on code in PR #1958:
URL: https://github.com/apache/ignite-3/pull/1958#discussion_r1196738964


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -2036,7 +2091,128 @@ public Set<String> getDataNodesByZoneId(int zoneId) {
         return inBusyLock(busyLock, () -> {
             ZoneState zoneState = zonesState.get(zoneId);
 
-            return zoneState.nodes;
+            return zoneState.nodes();
         });
     }
+
+    /**
+     * Returns local mapping of {@code nodeId} -> node's attributes, where 
{@code nodeId} is a node id, that changes between restarts.
+     * This map is updated every time we receive a topology event in a {@code 
topologyWatchListener}.
+     *
+     * @return Mapping {@code nodeId} -> node's attributes.
+     */
+    public Map<String, Map<String, String>> nodesAttributes() {
+        return nodesAttributes;
+    }
+
+    @TestOnly
+    Map<Integer, ZoneState> zonesTimers() {
+        return zonesState;
+    }
+
+    /**
+     * Structure that represents node with the attributes and which we store 
in Meta Storage when we store logical topology.
+     * Light-weighted version of the {@link LogicalNode}.
+     */
+    public static class NodeWithAttributes implements Serializable {

Review Comment:
   done



##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -2036,7 +2091,128 @@ public Set<String> getDataNodesByZoneId(int zoneId) {
         return inBusyLock(busyLock, () -> {
             ZoneState zoneState = zonesState.get(zoneId);
 
-            return zoneState.nodes;
+            return zoneState.nodes();
         });
     }
+
+    /**
+     * Returns local mapping of {@code nodeId} -> node's attributes, where 
{@code nodeId} is a node id, that changes between restarts.
+     * This map is updated every time we receive a topology event in a {@code 
topologyWatchListener}.
+     *
+     * @return Mapping {@code nodeId} -> node's attributes.
+     */
+    public Map<String, Map<String, String>> nodesAttributes() {
+        return nodesAttributes;
+    }
+
+    @TestOnly
+    Map<Integer, ZoneState> zonesTimers() {
+        return zonesState;
+    }
+
+    /**
+     * Structure that represents node with the attributes and which we store 
in Meta Storage when we store logical topology.
+     * Light-weighted version of the {@link LogicalNode}.
+     */
+    public static class NodeWithAttributes implements Serializable {
+        Node node;

Review Comment:
   fixed



##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/DistributionZoneManager.java:
##########
@@ -703,65 +776,23 @@ private CompletableFuture<Void> scaleDownAwaiting(int 
zoneId, boolean immediateS
     }
 
     /**
-     * Returns the future with data nodes of the specified zone.
+     * Returns the data nodes of the specified zone.
      *
      * @param zoneId Zone id.
      * @return Future.
      */
-    private CompletableFuture<Set<String>> getDataNodesFuture(int zoneId) {
+    private Set<String> dataNodes(int zoneId) {

Review Comment:
   removed



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