-1

I tried to create trigger using the following command of Apache IoTDB:

CREATE TRIGGER `alert-listener-sgld1s1` AFTER INSERT ON root.sgl.d1.s1 AS 'org.apache.iotdb.db.engine.trigger.example.AlertListener' WITH ( 'lo' = '0', 'hi'= '100.0').

However I got an error said that

java.lang.ClassNotFoundException: org.apache.iotdb.db.engine.trigger.example.AlertListener.

I wonder what did this jar package ClusterAlertingExample.jar do? Should I write the trigger processing class in the ClusterAlertingExample.jar package myself?

Adriaan
  • 17,741
  • 7
  • 42
  • 75
  • Please [edit] your post to add code and data as text ([using code formatting](https://stackoverflow.com/editing-help#code)), not images. Images: A) don't allow us to copy-&-paste the code/errors/data for testing; B) don't permit searching based on the code/error/data contents; and [many more reasons](https://meta.stackoverflow.com/a/285557). Images should only be used, in addition to text in code format, if having the image adds something significant that is not conveyed by just the text code/error/data. See [mcve] on what code is required. – Adriaan May 12 '23 at 09:57

1 Answers1

0

The class names specified after AS is the fully qualified class name of the class in the jar package you are using for Apache IoTDB. You can use implement trigger class to create an interface, set a trigger type, packed into jar package and register it. You can also refer to the instruction in the user manual of the official website.