Class SyncDataNodeClientPool
java.lang.Object
org.apache.iotdb.confignode.client.sync.SyncDataNodeClientPool
Synchronously send RPC requests to DataNodes. See queryengine.thrift for more details.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.common.collect.ImmutableMap<CnToDnSyncRequestType,org.apache.ratis.util.function.CheckedBiFunction<Object, SyncDataNodeInternalServiceClient, Object, Exception>> -
Method Summary
Modifier and TypeMethodDescriptionchangeRegionLeader(TConsensusGroupId regionId, TEndPoint dataNode, TDataNodeLocation newLeaderNode) change a region leader from the datanode to other datanode, other datanode should be in same raft group.static SyncDataNodeClientPoolsendSyncRequestToDataNodeWithGivenRetry(TEndPoint endPoint, Object req, CnToDnSyncRequestType requestType, int retryNum) sendSyncRequestToDataNodeWithRetry(TEndPoint endPoint, Object req, CnToDnSyncRequestType requestType)
-
Field Details
-
actionMap
protected com.google.common.collect.ImmutableMap<CnToDnSyncRequestType,org.apache.ratis.util.function.CheckedBiFunction<Object, actionMapSyncDataNodeInternalServiceClient, Object, Exception>>
-
-
Method Details
-
sendSyncRequestToDataNodeWithRetry
public Object sendSyncRequestToDataNodeWithRetry(TEndPoint endPoint, Object req, CnToDnSyncRequestType requestType) -
sendSyncRequestToDataNodeWithGivenRetry
public Object sendSyncRequestToDataNodeWithGivenRetry(TEndPoint endPoint, Object req, CnToDnSyncRequestType requestType, int retryNum) -
changeRegionLeader
public TRegionLeaderChangeResp changeRegionLeader(TConsensusGroupId regionId, TEndPoint dataNode, TDataNodeLocation newLeaderNode) change a region leader from the datanode to other datanode, other datanode should be in same raft group.- Parameters:
regionId- the region which will changer leaderdataNode- data node server, change regions leader from itnewLeaderNode- target data node, change regions leader to it- Returns:
- the result of the change leader operation
-
getInstance
-