类 ConfigNodeProcedureEnv


  • public class ConfigNodeProcedureEnv
    extends java.lang.Object
    • 方法详细资料

      • deleteConfig

        public org.apache.iotdb.common.rpc.thrift.TSStatus deleteConfig​(java.lang.String name)
        Delete ConfigNode cache, includes ClusterSchemaInfo and PartitionInfo
        参数:
        name - database name
        返回:
        tsStatus
      • preDelete

        public void preDelete​(PreDeleteStorageGroupPlan.PreDeleteType preDeleteType,
                              java.lang.String deleteSgName)
        Pre delete a database
        参数:
        preDeleteType - execute/rollback
        deleteSgName - database name
      • invalidateCache

        public boolean invalidateCache​(java.lang.String storageGroupName)
                                throws java.io.IOException,
                                       org.apache.thrift.TException
        参数:
        storageGroupName - database name
        返回:
        ALL SUCCESS OR NOT
        抛出:
        java.io.IOException - IOE
        org.apache.thrift.TException - Thrift IOE
      • verifySucceed

        public boolean verifySucceed​(org.apache.iotdb.common.rpc.thrift.TSStatus... status)
      • doubleCheckReplica

        public boolean doubleCheckReplica​(org.apache.iotdb.common.rpc.thrift.TDataNodeLocation removedDatanode)
      • addConsensusGroup

        public void addConsensusGroup​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation tConfigNodeLocation)
                               throws AddConsensusGroupException
        Let the remotely new ConfigNode build the ConsensusGroup. Actually, the parameter of this method can be empty, adding new raft peer to exist group should invoke createPeer(groupId, emptyList).
        参数:
        tConfigNodeLocation - New ConfigNode's location
        抛出:
        AddConsensusGroupException
      • addConfigNodePeer

        public void addConfigNodePeer​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation configNodeLocation)
                               throws AddPeerException
        Leader will add the new ConfigNode Peer into ConfigNodeRegion
        参数:
        configNodeLocation - The new ConfigNode
        抛出:
        AddPeerException - When addPeer doesn't success
      • removeConfigNodePeer

        public void removeConfigNodePeer​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation tConfigNodeLocation)
                                  throws ProcedureException
        Remove peer in Leader node
        参数:
        tConfigNodeLocation - node is removed
        抛出:
        ProcedureException - if failed status
      • deleteConfigNodePeer

        public void deleteConfigNodePeer​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation removedConfigNode)
                                  throws ProcedureException
        Remove Consensus Group in removed node
        参数:
        removedConfigNode - config node location
        抛出:
        ProcedureException - if failed status
      • stopConfigNode

        public void stopConfigNode​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation tConfigNodeLocation)
                            throws ProcedureException
        Stop ConfigNode and remove heartbeatCache
        参数:
        tConfigNodeLocation - config node location
        抛出:
        ProcedureException - if failed status
      • applyConfigNode

        public void applyConfigNode​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation configNodeLocation)
        Leader will record the new ConfigNode's information
        参数:
        configNodeLocation - The new ConfigNode
      • notifyRegisterSuccess

        public void notifyRegisterSuccess​(org.apache.iotdb.common.rpc.thrift.TConfigNodeLocation configNodeLocation)
        Leader will notify the new ConfigNode that registration success
        参数:
        configNodeLocation - The new ConfigNode
      • broadCastTheLatestConfigNodeGroup

        public void broadCastTheLatestConfigNodeGroup()
        Notify all DataNodes when the capacity of the ConfigNodeGroup is expanded or reduced
      • markDataNodeAsRemovingAndBroadcast

        public void markDataNodeAsRemovingAndBroadcast​(org.apache.iotdb.common.rpc.thrift.TDataNodeLocation dataNodeLocation)
        Mark the given datanode as removing status to avoid read or write request routing to this node.
        参数:
        dataNodeLocation - the datanode to be marked as removing status
      • doRegionCreation

        public java.util.Map<org.apache.iotdb.common.rpc.thrift.TConsensusGroupId,​org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> doRegionCreation​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupType consensusGroupType,
                                                                                                                                                               CreateRegionGroupsPlan createRegionGroupsPlan)
        Do region creations and broadcast the CreateRegionGroupsPlan
        返回:
        Those RegionReplicas that failed to create
      • activateRegionGroup

        public void activateRegionGroup​(org.apache.iotdb.common.rpc.thrift.TConsensusGroupId regionGroupId,
                                        java.util.Map<java.lang.Integer,​org.apache.iotdb.commons.cluster.RegionStatus> regionStatusMap)
      • broadcastRegionGroup

        public void broadcastRegionGroup()
      • getAllReplicaSets

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet> getAllReplicaSets​(java.lang.String storageGroup)
      • createTriggerOnDataNodes

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSStatus> createTriggerOnDataNodes​(org.apache.iotdb.commons.trigger.TriggerInformation triggerInformation,
                                                                                                    org.apache.iotdb.tsfile.utils.Binary jarFile)
                                                                                             throws java.io.IOException
        抛出:
        java.io.IOException
      • dropTriggerOnDataNodes

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSStatus> dropTriggerOnDataNodes​(java.lang.String triggerName,
                                                                                                  boolean needToDeleteJarFile)
      • activeTriggerOnDataNodes

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSStatus> activeTriggerOnDataNodes​(java.lang.String triggerName)
      • inactiveTriggerOnDataNodes

        public java.util.List<org.apache.iotdb.common.rpc.thrift.TSStatus> inactiveTriggerOnDataNodes​(java.lang.String triggerName)
      • getNodeLock

        public LockQueue getNodeLock()
      • getPipeLock

        public LockQueue getPipeLock()
      • getRegionMigrateLock

        public LockQueue getRegionMigrateLock()
      • getSchedulerLock

        public java.util.concurrent.locks.ReentrantLock getSchedulerLock()