public TSStatus addTriggerInTable(AddTriggerInTablePlan physicalPlan) {
    try {
      TriggerInformation triggerInformation = physicalPlan.getTriggerInformation();
      triggerTable.addTriggerInformation(triggerInformation.getTriggerName(), triggerInformation);
      if (triggerInformation.isUsingURI()) {
        existedJarToMD5.put(triggerInformation.getJarName(), triggerInformation.getJarFileMD5());
        if (physicalPlan.getJarFile() != null) {
          triggerExecutableManager.saveToInstallDir(
              ByteBuffer.wrap(physicalPlan.getJarFile().getValues()),
              triggerInformation.getJarName());
        }
      }
      return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
    } catch (Exception e) {
      final String errorMessage =
          String.format(
              "Failed to add trigger [%s] in TriggerTable on Config Nodes, because of %s",
              physicalPlan.getTriggerInformation().getTriggerName(), e);
      LOGGER.warn(errorMessage, e);
      return new TSStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode())
          .setMessage(errorMessage);
    }
  }
Validate whether the trigger can be dropped.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/TriggerInfo.java