alievmirza commented on code in PR #1958:
URL: https://github.com/apache/ignite-3/pull/1958#discussion_r1196738535
##########
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:
I decided to preserve the composition, mostly because often we want to
convert `NodeWithAttributes` to `Node`, it is easier to with the composition
--
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]