hanishakoneru commented on a change in pull request #1494:
URL: https://github.com/apache/ozone/pull/1494#discussion_r640927813



##########
File path: 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneHAClusterImpl.java
##########
@@ -652,10 +667,158 @@ private void initOMHAConfig(int basePort) throws 
IOException {
         conf.setInt(omRatisPortKey, port + 4);
       }
 
-      conf.set(omNodesKey, omNodesKeyValue.substring(1));
+      conf.set(omNodesKey, String.join(",", omNodeIds));
+    }
+  }
+
+  /**
+   * Bootstrap new OM and add to existing OM HA service ring.
+   * @return new OM nodeId
+   */
+  public void bootstrapOzoneManager(String omNodeId) throws Exception {
+
+    int basePort;
+    int retryCount = 0;
+
+    OzoneManager om = null;
+
+    long leaderSnapshotIndex = getOMLeader().getRatisSnapshotIndex();
+
+    while (true) {
+      try {
+        basePort = 10000 + RANDOM.nextInt(1000) * 4;
+        OzoneConfiguration newConf = addNewOMToConfig(getOMServiceId(),
+            omNodeId, basePort);
+
+        om = bootstrapNewOM(omNodeId);
+
+        // Get the CertClient from an existing OM and set for new OM
+        if (omhaService.getServiceByIndex(0).getCertificateClient() != null) {
+          om.setCertClient(

Review comment:
       You are right. I replicated this from MiniOzoneCluster. Will remove it.




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

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