public void validate(String triggerName, String jarName, String jarMD5)
      throws TriggerManagementException {
    if (triggerTable.containsTrigger(triggerName)) {
      throw new TriggerManagementException(
          String.format(
              "Failed to create trigger [%s], the same name trigger has been created",
              triggerName));
    }

    if (existedJarToMD5.containsKey(jarName) && !existedJarToMD5.get(jarName).equals(jarMD5)) {
      throw new TriggerManagementException(
          String.format(
              "Failed to create trigger [%s], the same name Jar [%s] but different MD5 [%s] has existed",
              triggerName, jarName, jarMD5));
    }
  }
Validate whether the trigger can be created.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TriggerInfo.java