adoroszlai commented on a change in pull request #649: HDDS-3120. Freon work 
with OM HA.
URL: https://github.com/apache/hadoop-ozone/pull/649#discussion_r389922896
 
 

 ##########
 File path: 
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/OmBucketGenerator.java
 ##########
 @@ -46,24 +48,49 @@
       defaultValue = "vol1")
   private String volumeName;
 
+  @Option(
+      names = "--om-service-id",
+      description = "OM Service ID"
+  )
+  private String omServiceID = null;
+
   private OzoneManagerProtocol ozoneManagerClient;
 
   private Timer bucketCreationTimer;
 
   @Override
   public Void call() throws Exception {
 
-    init();
+    OzoneClient ozoneClient = null;
+    try {
+      init();
+
+      OzoneConfiguration ozoneConfiguration = createOzoneConfiguration();
+
+      ozoneManagerClient = createOmClient(ozoneConfiguration, omServiceID);
+
+      if (omServiceID != null) {
+        ozoneClient = OzoneClientFactory.getRpcClient(omServiceID,
+            ozoneConfiguration);
+      } else {
+        ozoneClient = OzoneClientFactory.getRpcClient(ozoneConfiguration);
+      }
 
 Review comment:
   Please reuse `createOzoneClient` from parent class.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to