private Map<String, List<String>> constructTriggerNameToMeasurementListMap(
      InsertNode node, TriggerEvent event) {
    PartialPath device = node.getTargetPath();
    List<String> measurements = new ArrayList<>();
    for (String measurement : node.getMeasurements()) {
      if (measurement != null) {
        measurements.add(measurement);
      }
    }

    List<List<String>> triggerNameLists =
        TriggerManagementService.getInstance().getMatchedTriggerListForPath(device, measurements);
    boolean isAllEmpty = true;
    for (List<String> triggerNameList : triggerNameLists) {
      if (!triggerNameList.isEmpty()) {
        isAllEmpty = false;
        break;
      }
    }
    if (isAllEmpty) {
      return Collections.emptyMap();
    }

    Map<String, List<String>> triggerNameToPaths = new HashMap<>();
    TriggerTable triggerTable = TriggerManagementService.getInstance().getTriggerTable();
    for (int i = 0, n = measurements.size(); i < n; i++) {
      for (String triggerName : triggerNameLists.get(i)) {
        TriggerInformation triggerInformation = triggerTable.getTriggerInformation(triggerName);
        if (triggerInformation.getEvent().equals(event)
            && triggerInformation.getTriggerState().equals(TTriggerState.ACTIVE)) {
          triggerNameToPaths
              .computeIfAbsent(triggerName, k -> new ArrayList<>())
              .add(measurements.get(i));
        }
      }
    }
    return triggerNameToPaths;
  }
How many times should we retry when error occurred during firing a trigger on another datanode.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java