public TGetLocationForTriggerResp getLocationOfStatefulTrigger(String triggerName) {
    try {
      return ((TriggerLocationResp)
              configManager.getConsensusManager().read(new GetTriggerLocationPlan(triggerName)))
          .convertToThriftResponse();
    } catch (ConsensusException e) {
      LOGGER.warn("Failed in the read API executing the consensus layer due to: ", e);
      return new TGetLocationForTriggerResp(
          new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())
              .setMessage(e.getMessage()));
    }
  }
Create a trigger in cluster.

<p>If TriggerType is STATELESS, we should create TriggerInstance on all DataNodes, the
DataNodeLocation in TriggerInformation will be null.

<p>If TriggerType is STATEFUL, we should create TriggerInstance on the DataNode with the lowest
load, and DataNodeLocation of this DataNode will be saved.

<p>All DataNodes will add TriggerInformation of this trigger in local TriggerTable.

@param req the createTrigger request
@return status of create this trigger
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/TriggerManager.java