类 SystemPropertiesUtils


  • public class SystemPropertiesUtils
    extends java.lang.Object
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static void checkSystemProperties()
      Check whether system parameters are consistent during each restart.
      static boolean isRestarted()
      Check if the ConfigNode is restarted
      static boolean isSeedConfigNode()
      Check if the current ConfigNode is SeedConfigNode.
      static java.lang.String loadClusterNameWhenRestarted()
      Load the cluster_name in confignode-system.properties file.
      static int loadConfigNodeIdWhenRestarted()
      Load the config_node_id in confignode-system.properties file.
      static java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> loadConfigNodeList()
      Load the config_node_list in confignode-system.properties file.
      static void storeConfigNodeList​(java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> configNodes)
      Store the latest config_node_list in confignode-system.properties file
      static void storeSystemParameters()
      The system parameters can't be changed after the ConfigNode first started.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • SystemPropertiesUtils

        public SystemPropertiesUtils()
    • 方法详细资料

      • isRestarted

        public static boolean isRestarted()
        Check if the ConfigNode is restarted
        返回:
        True if confignode-system.properties file exist.
      • checkSystemProperties

        public static void checkSystemProperties()
                                          throws java.io.IOException,
                                                 org.apache.iotdb.commons.exception.ConfigurationException
        Check whether system parameters are consistent during each restart. We only invoke this interface when restarted
        抛出:
        java.io.IOException - When read the confignode-system.properties file failed
        org.apache.iotdb.commons.exception.ConfigurationException - When some system parameters are inconsistent
      • loadConfigNodeList

        public static java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> loadConfigNodeList()
                                                                                                         throws java.io.IOException,
                                                                                                                org.apache.iotdb.commons.exception.BadNodeUrlException
        Load the config_node_list in confignode-system.properties file. We only invoke this interface when restarted.
        返回:
        The property of config_node_list in confignode-system.properties file
        抛出:
        java.io.IOException - When load confignode-system.properties file failed
        org.apache.iotdb.commons.exception.BadNodeUrlException - When parsing config_node_list failed
      • storeSystemParameters

        public static void storeSystemParameters()
                                          throws java.io.IOException
        The system parameters can't be changed after the ConfigNode first started. Therefore, store them in confignode-system.properties during the first startup
        抛出:
        java.io.IOException
      • storeConfigNodeList

        public static void storeConfigNodeList​(java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> configNodes)
                                        throws java.io.IOException
        Store the latest config_node_list in confignode-system.properties file
        参数:
        configNodes - The latest ConfigNodeList
        抛出:
        java.io.IOException - When store confignode-system.properties file failed
      • loadClusterNameWhenRestarted

        public static java.lang.String loadClusterNameWhenRestarted()
                                                             throws java.io.IOException
        Load the cluster_name in confignode-system.properties file. We only invoke this interface when restarted.
        返回:
        The property of cluster_name in confignode-system.properties file
        抛出:
        java.io.IOException - When load confignode-system.properties file failed
      • loadConfigNodeIdWhenRestarted

        public static int loadConfigNodeIdWhenRestarted()
                                                 throws java.io.IOException
        Load the config_node_id in confignode-system.properties file. We only invoke this interface when restarted.
        返回:
        The property of config_node_id in confignode-system.properties file
        抛出:
        java.io.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.

        返回:
        True if the is_seed_config_node is set to True in iotdb-confignode.properties file or getInternalAddress().equals(conf.getTargetConfigNode())