tanvipenumudy commented on code in PR #5391:
URL: https://github.com/apache/ozone/pull/5391#discussion_r1433549361


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -1139,6 +1151,20 @@ public void setCertClient(CertificateClient newClient) 
throws IOException {
     serviceInfo = new ServiceInfoProvider(secConfig, this, certClient);
   }
 
+  /**
+   * For testing purpose only. This allows setting up ScmBlockLocationClient
+   * without having to fully setup a working cluster.
+   */
+  @VisibleForTesting
+  public void setScmTopologyClient(
+      ScmTopologyClient scmTopologyClient) {
+    this.scmTopologyClient = scmTopologyClient;
+  }
+
+  public NetworkTopology getClusterMap() {
+    return clusterMap;

Review Comment:
   Currently, we initialize the `clusterMap` (type: `NetworkTopology`) in OM 
during startup based on the schema file and the fetched `clusterTree` 
information (type: `InnerNode`) from `ScmTopologyClient` (which implements a 
background thread responsible for periodic caching and refreshing of this 
`clusterTree` obtained from SCM at every ~1 hr interval).



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to