Package org.apache.hadoop.ozone.om.ha
Class OMHANodeDetails
java.lang.Object
org.apache.hadoop.ozone.om.ha.OMHANodeDetails
Class which maintains peer information and it's own OM node information.
-
Constructor Summary
ConstructorsConstructorDescriptionOMHANodeDetails(org.apache.hadoop.ozone.om.helpers.OMNodeDetails localNodeDetails, List<org.apache.hadoop.ozone.om.helpers.OMNodeDetails> peerNodeDetails) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hadoop.ozone.om.helpers.OMNodeDetailsgetHAOMNodeDetails(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort) Create Local OM Node Details.static org.apache.hadoop.ozone.om.helpers.OMNodeDetailsgetHAOMNodeDetails(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort, boolean isListener) org.apache.hadoop.ozone.om.helpers.OMNodeDetailsstatic org.apache.hadoop.ozone.om.helpers.OMNodeDetailsgetOMNodeDetailsForNonHA(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort) Create Local OM Node Details.static org.apache.hadoop.ozone.om.helpers.OMNodeDetailsgetOMNodeDetailsForNonHA(org.apache.hadoop.hdds.conf.OzoneConfiguration conf, String serviceId, String nodeId, InetSocketAddress rpcAddress, int ratisPort, boolean isListener) static OMHANodeDetailsloadOMHAConfig(org.apache.hadoop.hdds.conf.OzoneConfiguration conf) Inspects and loads OM node configurations.
-
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
-
loadOMHAConfig
Inspects and loads OM node configurations. IfOMConfigKeys.OZONE_OM_SERVICE_IDS_KEYis configured with multiple ids and/ or ifOMConfigKeys.OZONE_OM_NODE_ID_KEYis 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)
-