DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

chethanrao97_162932 avatar image
chethanrao97_162932 asked ·

Why does a custom trigger JAR load but the class not get executed?

I have created the custom trigger.jar and placed in the directory where Cassandra service can read the same, after performing the "nodetool realoadtriggers" it just prints "Loading new <path>/trigger.jar" in system.log, but it's not executing the java class in the jar.

Note: Also, I have created the trigger on the table which should trigger this custom trigger jar, but that is also not happening

The java class implements ITrigger overrides argument method. Any pointers for debugging the same will be helpful.

cassandratrigger
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

There really isn't anything helpful in your question that allows us to assist you. You need to provide actionable information such as:

  • details of your implementation
  • how you configured it
  • Cassandra version
  • sample code

for us to be able to provide any meaningful answer.

You need to provide the trigger definition, for example:

CREATE TRIGGER sometrigger ON sometable USING 'o.a.c.triggers.SomeTriggerClass'

You'll need to place the custom SomeTriggerClass.jar in the triggers/ sub-directory on every node in your cluster. The location depends on the type of Cassandra installation but again, you haven't provided any actionable details. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.