Package org.apache.iotdb.confignode.conf
Class SystemPropertiesUtils
java.lang.Object
org.apache.iotdb.confignode.conf.SystemPropertiesUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidCheck whether system parameters are consistent during each restart.static booleanCheck if the ConfigNode is restarted.static booleanCheck if the current ConfigNode is SeedConfigNode.static intLoad the config_node_id in confignode-system.properties file.static List<TConfigNodeLocation>Load the config_node_list in confignode-system.properties file.static voidstatic voidstoreConfigNodeList(List<TConfigNodeLocation> configNodes) Store the latest config_node_list in confignode-system.properties filestatic voidThe system parameters can't be changed after the ConfigNode first started.
-
Method Details
-
reinitializeStatics
public static void reinitializeStatics() -
isRestarted
public static boolean isRestarted()Check if the ConfigNode is restarted.- Returns:
- True if confignode-system.properties file exist.
-
checkSystemProperties
Check whether system parameters are consistent during each restart. We only invoke this interface when restarted.- Throws:
IOException- When read the confignode-system.properties file failed
-
loadConfigNodeList
public static List<TConfigNodeLocation> loadConfigNodeList() throws IOException, BadNodeUrlExceptionLoad the config_node_list in confignode-system.properties file. We only invoke this interface when restarted.- Returns:
- The property of config_node_list in confignode-system.properties file
- Throws:
IOException- When load confignode-system.properties file failedBadNodeUrlException- When parsing config_node_list failed
-
storeSystemParameters
The system parameters can't be changed after the ConfigNode first started. Therefore, store them in confignode-system.properties during the first startup.- Throws:
IOException- systemPropertiesHandler.read()
-
storeConfigNodeList
Store the latest config_node_list in confignode-system.properties file- Parameters:
configNodes- The latest ConfigNodeList- Throws:
IOException- When store confignode-system.properties file failed
-
loadConfigNodeIdWhenRestarted
Load the config_node_id in confignode-system.properties file. We only invoke this interface when restarted.- Returns:
- The property of config_node_id in confignode-system.properties file
- Throws:
IOException- When load confignode-system.properties file failed
-
isSeedConfigNode
public static boolean isSeedConfigNode()Check if the current ConfigNode is SeedConfigNode.Notice: Only invoke this interface when restarted.
- Returns:
- True if the is_seed_config_node is set to True in iotdb-confignode.properties file
-