类 NodeInfo

  • 所有已实现的接口:
    org.apache.iotdb.commons.snapshot.SnapshotProcessor

    public class NodeInfo
    extends java.lang.Object
    implements org.apache.iotdb.commons.snapshot.SnapshotProcessor
    The NodeInfo stores cluster node information. The cluster node information including: 1. DataNode information 2. ConfigNode information
    • 构造器详细资料

      • NodeInfo

        public NodeInfo()
    • 方法详细资料

      • registerDataNode

        public org.apache.iotdb.common.rpc.thrift.TSStatus registerDataNode​(RegisterDataNodePlan registerDataNodePlan)
        Persist DataNode info
        参数:
        registerDataNodePlan - RegisterDataNodePlan
        返回:
        SUCCESS_STATUS
      • removeDataNode

        public org.apache.iotdb.common.rpc.thrift.TSStatus removeDataNode​(RemoveDataNodePlan req)
        Persist Information about remove dataNode
        参数:
        req - RemoveDataNodePlan
        返回:
        TSStatus
      • updateDataNode

        public org.apache.iotdb.common.rpc.thrift.TSStatus updateDataNode​(UpdateDataNodePlan updateDataNodePlan)
        Update the specified DataNode‘s location
        参数:
        updateDataNodePlan - UpdateDataNodePlan
        返回:
        SUCCESS_STATUS if update DataNode info successfully, otherwise return UPDATE_DATA_NODE_ERROR
      • getDataNodeConfiguration

        public DataNodeConfigurationResp getDataNodeConfiguration​(GetDataNodeConfigurationPlan getDataNodeConfigurationPlan)
        Get DataNodeConfiguration
        参数:
        getDataNodeConfigurationPlan - GetDataNodeConfigurationPlan
        返回:
        The specific DataNode's configuration or all DataNodes' configuration if dataNodeId in GetDataNodeConfigurationPlan is -1
      • getRegisteredDataNodeCount

        public int getRegisteredDataNodeCount()
        Return the number of registered DataNodes
      • getRegisteredConfigNodeCount

        public int getRegisteredConfigNodeCount()
        Return the number of registered ConfigNodes
      • getTotalCpuCoreCount

        public int getTotalCpuCoreCount()
        Return the number of total cpu cores in online DataNodes
      • getRegisteredDataNodes

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration> getRegisteredDataNodes()
        返回:
        All registered DataNodes
      • getRegisteredDataNode

        public org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration getRegisteredDataNode​(int dataNodeId)
        返回:
        The specified registered DataNode
      • applyConfigNode

        public org.apache.iotdb.common.rpc.thrift.TSStatus applyConfigNode​(ApplyConfigNodePlan applyConfigNodePlan)
        Update ConfigNodeList both in memory and confignode-system.properties file
        参数:
        applyConfigNodePlan - ApplyConfigNodePlan
        返回:
        APPLY_CONFIGNODE_FAILED if update online ConfigNode failed.
      • removeConfigNode

        public org.apache.iotdb.common.rpc.thrift.TSStatus removeConfigNode​(RemoveConfigNodePlan removeConfigNodePlan)
        Update ConfigNodeList both in memory and confignode-system.properties file
        参数:
        removeConfigNodePlan - RemoveConfigNodePlan
        返回:
        REMOVE_CONFIGNODE_FAILED if remove online ConfigNode failed.
      • getRegisteredConfigNodes

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation> getRegisteredConfigNodes()
      • generateNextNodeId

        public int generateNextNodeId()
      • processTakeSnapshot

        public boolean processTakeSnapshot​(java.io.File snapshotDir)
                                    throws java.io.IOException,
                                           org.apache.thrift.TException
        指定者:
        processTakeSnapshot 在接口中 org.apache.iotdb.commons.snapshot.SnapshotProcessor
        抛出:
        java.io.IOException
        org.apache.thrift.TException
      • processLoadSnapshot

        public void processLoadSnapshot​(java.io.File snapshotDir)
                                 throws java.io.IOException,
                                        org.apache.thrift.TException
        指定者:
        processLoadSnapshot 在接口中 org.apache.iotdb.commons.snapshot.SnapshotProcessor
        抛出:
        java.io.IOException
        org.apache.thrift.TException
      • getMinimumDataNode

        public static int getMinimumDataNode()
      • clear

        public void clear()
      • equals

        public boolean equals​(java.lang.Object o)
        覆盖:
        equals 在类中 java.lang.Object
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 java.lang.Object