类 NodeInfo
- java.lang.Object
-
- org.apache.iotdb.confignode.persistence.node.NodeInfo
-
- 所有已实现的接口:
org.apache.iotdb.commons.snapshot.SnapshotProcessor
public class NodeInfo extends java.lang.Object implements org.apache.iotdb.commons.snapshot.SnapshotProcessorThe NodeInfo stores cluster node information. The cluster node information including: 1. DataNode information 2. ConfigNode information
-
-
构造器概要
构造器 构造器 说明 NodeInfo()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 org.apache.iotdb.common.rpc.thrift.TSStatusapplyConfigNode(ApplyConfigNodePlan applyConfigNodePlan)Update ConfigNodeList both in memory and confignode-system.properties filevoidclear()booleanequals(java.lang.Object o)intgenerateNextNodeId()DataNodeConfigurationRespgetDataNodeConfiguration(GetDataNodeConfigurationPlan getDataNodeConfigurationPlan)Get DataNodeConfigurationstatic intgetMinimumDataNode()intgetRegisteredConfigNodeCount()Return the number of registered ConfigNodesjava.util.List<org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation>getRegisteredConfigNodes()org.apache.iotdb.common.rpc.thrift.TDataNodeConfigurationgetRegisteredDataNode(int dataNodeId)intgetRegisteredDataNodeCount()Return the number of registered DataNodesjava.util.List<org.apache.iotdb.common.rpc.thrift.TDataNodeConfiguration>getRegisteredDataNodes()intgetTotalCpuCoreCount()Return the number of total cpu cores in online DataNodesinthashCode()voidprocessLoadSnapshot(java.io.File snapshotDir)booleanprocessTakeSnapshot(java.io.File snapshotDir)org.apache.iotdb.common.rpc.thrift.TSStatusregisterDataNode(RegisterDataNodePlan registerDataNodePlan)Persist DataNode infoorg.apache.iotdb.common.rpc.thrift.TSStatusremoveConfigNode(RemoveConfigNodePlan removeConfigNodePlan)Update ConfigNodeList both in memory and confignode-system.properties fileorg.apache.iotdb.common.rpc.thrift.TSStatusremoveDataNode(RemoveDataNodePlan req)Persist Information about remove dataNodeorg.apache.iotdb.common.rpc.thrift.TSStatusupdateDataNode(UpdateDataNodePlan updateDataNodePlan)Update the specified DataNode‘s location
-
-
-
方法详细资料
-
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.IOExceptionorg.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.IOExceptionorg.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
-
-