Class ClusterNodeStartUtils
java.lang.Object
org.apache.iotdb.confignode.manager.node.ClusterNodeStartUtils
Startup check utils before register/restart a ConfigNode/DataNode.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncheckConflictTEndPointForNewAINode(TAINodeLocation newAINodeLocation, List<TAINodeConfiguration> registeredAINodes) Check if there exist conflict TEndPoints on the DataNode to be registered.checkConflictTEndPointForNewConfigNode(TConfigNodeLocation newConfigNodeLocation, List<TConfigNodeLocation> registeredConfigNodes) Check if there exist conflict TEndPoints on the ConfigNode to be registered.checkConflictTEndPointForNewDataNode(TDataNodeLocation newDataNodeLocation, List<TDataNodeConfiguration> registeredDataNodes) Check if there exist conflict TEndPoints on the DataNode to be registered.checkUpdatedTEndPointOfConfigNode(TConfigNodeLocation restartLocation, TConfigNodeLocation recordLocation) Check if some TEndPoints of the specified ConfigNode have updated.checkUpdatedTEndPointOfDataNode(TDataNodeLocation restartLocation, TDataNodeLocation recordLocation) Check if some TEndPoints of the specified DataNode have updated.static TSStatusconfirmAINodeRegistration(TAINodeRegisterReq req, ConfigManager configManager) static TSStatusconfirmClusterId(ConfigManager configManager) static TSStatusconfirmConfigNodeRegistration(TConfigNodeRegisterReq req, ConfigManager configManager) static TSStatusconfirmDataNodeRegistration(TDataNodeRegisterReq req, ConfigManager configManager) static TSStatusconfirmNodeRestart(NodeType nodeType, String clusterName, String clusterId, int nodeId, Object nodeLocation, ConfigManager configManager) static TAINodeLocationmatchRegisteredAINode(TAINodeLocation aiNodeLocation, List<TAINodeConfiguration> registeredAINodes) Check if there exists a registered AINode who has the same index of the given one.static TConfigNodeLocationmatchRegisteredConfigNode(TConfigNodeLocation configNodeLocation, List<TConfigNodeLocation> registeredConfigNodes) Check if there exists a registered ConfigNode who has the same index of the given one.static TDataNodeLocationmatchRegisteredDataNode(TDataNodeLocation dataNodeLocation, List<TDataNodeConfiguration> registeredDataNodes) Check if there exists a registered DataNode who has the same index of the given one.
-
Field Details
-
ACCEPT_NODE_REGISTRATION
-
ACCEPT_NODE_RESTART
-
-
Method Details
-
confirmClusterId
-
confirmDataNodeRegistration
public static TSStatus confirmDataNodeRegistration(TDataNodeRegisterReq req, ConfigManager configManager) -
confirmConfigNodeRegistration
public static TSStatus confirmConfigNodeRegistration(TConfigNodeRegisterReq req, ConfigManager configManager) -
confirmAINodeRegistration
public static TSStatus confirmAINodeRegistration(TAINodeRegisterReq req, ConfigManager configManager) -
checkConflictTEndPointForNewAINode
public static List<TEndPoint> checkConflictTEndPointForNewAINode(TAINodeLocation newAINodeLocation, List<TAINodeConfiguration> registeredAINodes) Check if there exist conflict TEndPoints on the DataNode to be registered.- Parameters:
newAINodeLocation- The TDataNodeLocation of the DataNode to be registeredregisteredAINodes- All registered DataNodes- Returns:
- The conflict TEndPoints if exist
-
confirmNodeRestart
-
checkConflictTEndPointForNewConfigNode
public static List<TEndPoint> checkConflictTEndPointForNewConfigNode(TConfigNodeLocation newConfigNodeLocation, List<TConfigNodeLocation> registeredConfigNodes) Check if there exist conflict TEndPoints on the ConfigNode to be registered.- Parameters:
newConfigNodeLocation- The TConfigNode of the ConfigNode to be registeredregisteredConfigNodes- All registered ConfigNodes- Returns:
- The conflict TEndPoints if exist
-
checkConflictTEndPointForNewDataNode
public static List<TEndPoint> checkConflictTEndPointForNewDataNode(TDataNodeLocation newDataNodeLocation, List<TDataNodeConfiguration> registeredDataNodes) Check if there exist conflict TEndPoints on the DataNode to be registered.- Parameters:
newDataNodeLocation- The TDataNodeLocation of the DataNode to be registeredregisteredDataNodes- All registered DataNodes- Returns:
- The conflict TEndPoints if exist
-
matchRegisteredConfigNode
public static TConfigNodeLocation matchRegisteredConfigNode(TConfigNodeLocation configNodeLocation, List<TConfigNodeLocation> registeredConfigNodes) Check if there exists a registered ConfigNode who has the same index of the given one.- Parameters:
configNodeLocation- The given ConfigNoderegisteredConfigNodes- Registered ConfigNodes- Returns:
- The ConfigNodeLocation who has the same index of the given one, null otherwise.
-
matchRegisteredAINode
public static TAINodeLocation matchRegisteredAINode(TAINodeLocation aiNodeLocation, List<TAINodeConfiguration> registeredAINodes) Check if there exists a registered AINode who has the same index of the given one.- Parameters:
aiNodeLocation- The given AINoderegisteredAINodes- Registered AINodes- Returns:
- The AINodeLocation who has the same index of the given one, null otherwise.
-
matchRegisteredDataNode
public static TDataNodeLocation matchRegisteredDataNode(TDataNodeLocation dataNodeLocation, List<TDataNodeConfiguration> registeredDataNodes) Check if there exists a registered DataNode who has the same index of the given one.- Parameters:
dataNodeLocation- The given DataNoderegisteredDataNodes- Registered DataNodes- Returns:
- The DataNodeLocation who has the same index of the given one, null otherwise.
-
checkUpdatedTEndPointOfConfigNode
public static Set<Integer> checkUpdatedTEndPointOfConfigNode(TConfigNodeLocation restartLocation, TConfigNodeLocation recordLocation) Check if some TEndPoints of the specified ConfigNode have updated.- Parameters:
restartLocation- The location of restart ConfigNoderecordLocation- The record ConfigNode location- Returns:
- The set of TEndPoints that have modified.
-
checkUpdatedTEndPointOfDataNode
public static Set<Integer> checkUpdatedTEndPointOfDataNode(TDataNodeLocation restartLocation, TDataNodeLocation recordLocation) Check if some TEndPoints of the specified DataNode have updated.- Parameters:
restartLocation- The location of restart DataNoderecordLocation- The record DataNode location- Returns:
- The set of TEndPoints that have modified.
-