Class OMHANodeDetails

java.lang.Object
org.apache.hadoop.ozone.om.ha.OMHANodeDetails

public class OMHANodeDetails extends Object
Class which maintains peer information and it's own OM node information.
  • Constructor Details

    • OMHANodeDetails

      public OMHANodeDetails(org.apache.hadoop.ozone.om.helpers.OMNodeDetails localNodeDetails, List<org.apache.hadoop.ozone.om.helpers.OMNodeDetails> peerNodeDetails)
  • Method Details

    • getLocalNodeDetails

      public org.apache.hadoop.ozone.om.helpers.OMNodeDetails getLocalNodeDetails()
    • getPeerNodesMap

      public Map<String,org.apache.hadoop.ozone.om.helpers.OMNodeDetails> getPeerNodesMap()
    • loadOMHAConfig

      public static OMHANodeDetails loadOMHAConfig(org.apache.hadoop.hdds.conf.OzoneConfiguration conf)
      Inspects and loads OM node configurations. If OMConfigKeys.OZONE_OM_SERVICE_IDS_KEY is configured with multiple ids and/ or if OMConfigKeys.OZONE_OM_NODE_ID_KEY is not specifically configured , this method determines the omServiceId and omNodeId by matching the node's address with the configured addresses. When a match is found, it sets the omServicId and omNodeId from the corresponding configuration key. This method also finds the OM peers nodes belonging to the same OM service.
      Parameters:
      conf -
    • getOMNodeDetailsForNonHA

      public static org.apache.hadoop.ozone.om.helpers.OMNodeDetails getOMNodeDetailsForNonHA(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort)
      Create Local OM Node Details.
      Parameters:
      serviceId - - Service ID this OM belongs to,
      nodeId - - Node ID of this OM.
      rpcAddress - - Rpc Address of the OM.
      ratisPort - - Ratis port of the OM.
      Returns:
      OMNodeDetails
    • getOMNodeDetailsForNonHA

      public static org.apache.hadoop.ozone.om.helpers.OMNodeDetails getOMNodeDetailsForNonHA(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort, boolean isListener)
    • getHAOMNodeDetails

      public static org.apache.hadoop.ozone.om.helpers.OMNodeDetails getHAOMNodeDetails(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort)
      Create Local OM Node Details.
      Parameters:
      serviceId - - Service ID this OM belongs to,
      nodeId - - Node ID of this OM.
      rpcAddress - - Rpc Address of the OM.
      ratisPort - - Ratis port of the OM.
      Returns:
      OMNodeDetails
    • getHAOMNodeDetails

      public static org.apache.hadoop.ozone.om.helpers.OMNodeDetails getHAOMNodeDetails(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort, boolean isListener)