private void buildActionMap() {
    ImmutableMap.Builder<
            CnToDnSyncRequestType,
            CheckedBiFunction<Object, SyncDataNodeInternalServiceClient, Object, Exception>>
        actionMapBuilder = ImmutableMap.builder();
    actionMapBuilder.put(
        CnToDnSyncRequestType.INVALIDATE_PARTITION_CACHE,
        (req, client) -> client.invalidatePartitionCache((TInvalidateCacheReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.INVALIDATE_SCHEMA_CACHE,
        (req, client) -> client.invalidateSchemaCache((TInvalidateCacheReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.CREATE_SCHEMA_REGION,
        (req, client) -> client.createSchemaRegion((TCreateSchemaRegionReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.CREATE_DATA_REGION,
        (req, client) -> client.createDataRegion((TCreateDataRegionReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.DELETE_REGION,
        (req, client) -> client.deleteRegion((TConsensusGroupId) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.INVALIDATE_PERMISSION_CACHE,
        (req, client) -> client.invalidatePermissionCache((TInvalidatePermissionCacheReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.CLEAN_DATA_NODE_CACHE,
        (req, client) -> client.cleanDataNodeCache((TCleanDataNodeCacheReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.STOP_AND_CLEAR_DATA_NODE,
        (req, client) -> client.stopAndClearDataNode());
    actionMapBuilder.put(
        CnToDnSyncRequestType.SET_SYSTEM_STATUS,
        (req, client) -> client.setSystemStatus((String) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.KILL_QUERY_INSTANCE,
        (req, client) -> client.killQueryInstance((String) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.UPDATE_TEMPLATE,
        (req, client) -> client.updateTemplate((TUpdateTemplateReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.UPDATE_TABLE,
        (req, client) -> client.updateTable((TUpdateTableReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.CREATE_NEW_REGION_PEER,
        (req, client) -> client.createNewRegionPeer((TCreatePeerReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.ADD_REGION_PEER,
        (req, client) -> client.addRegionPeer((TMaintainPeerReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.REMOVE_REGION_PEER,
        (req, client) -> client.removeRegionPeer((TMaintainPeerReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.DELETE_OLD_REGION_PEER,
        (req, client) -> client.deleteOldRegionPeer((TMaintainPeerReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.RESET_PEER_LIST,
        (req, client) -> client.resetPeerList((TResetPeerListReq) req));
    actionMapBuilder.put(
        CnToDnSyncRequestType.SHOW_CONFIGURATION, (req, client) -> client.showConfiguration());
    actionMap = actionMapBuilder.build();
  }
Synchronously send RPC requests to DataNodes. See queryengine.thrift for more details.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java