arp7 commented on a change in pull request #703: HDDS-1371. Download RocksDB 
checkpoint from OM Leader to Follower.
URL: https://github.com/apache/hadoop/pull/703#discussion_r273736701
 
 

 ##########
 File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
 ##########
 @@ -526,6 +530,48 @@ private void setOMNodeDetails(String serviceId, String 
nodeId,
     // Set this nodes OZONE_OM_ADDRESS_KEY to the discovered address.
     configuration.set(OZONE_OM_ADDRESS_KEY,
         NetUtils.getHostPortString(rpcAddress));
+
+    // Find the Ratis storage dir
+    String omRatisDirectory = OmUtils.getOMRatisDirectory(configuration);
+    if (omRatisDirectory == null || omRatisDirectory.isEmpty()) {
+      throw new IllegalArgumentException(HddsConfigKeys.OZONE_METADATA_DIRS +
+          " must be defined.");
+    }
+
+    omRatisStorageDir = OmUtils.createOMDir(omRatisDirectory);
+    omRatisSnapshotDir = OmUtils.createOMDir(
+        OmUtils.getOMRatisSnapshotDirectory(configuration));
+
+    // Get and set Http(s) address of local node. If base config keys are
+    // not set, check for keys suffixed with OM Node ID.
+    setOMNodeSpecificConfigs(nodeId);
+  }
+
+  /**
+   * Check if any of the following configuration keys have been set using OM
+   * Node ID suffixed to the key. If yes, then set the base key with the
+   * configured valued.
+   *    1. {@link OMConfigKeys#OZONE_OM_HTTP_ADDRESS_KEY}
+   *    2. {@link OMConfigKeys#OZONE_OM_HTTPS_ADDRESS_KEY}
+   *    3. {@link OMConfigKeys#OZONE_OM_HTTP_BIND_HOST_KEY}
+   *    4. {@link OMConfigKeys#OZONE_OM_HTTPS_BIND_HOST_KEY}
+   */
+  private void setOMNodeSpecificConfigs(String omNodeId) {
 
 Review comment:
   I didn't understand this. Could you explain a bit what it does?

----------------------------------------------------------------
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: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to