I faced issue with triggers today. Below is the clear description of the
1) When we planned to use triggers, we placed the triggers.jar file in
/conf/triggers folder in Cassandra, restarted the Cassandra service and
created a trigger in CQLSH. Everything was working good as expected.
2) Recently we started getting the below error in Cassandra logs saying
trigger.jar is missing in /tmp/lib directory folder.
ServerError: <ErrorMessage code=0000 [Server error]
(No such file or directory)">
3) We thought that the jar is corrupted somehow and reloaded the triggers
again by placing the newly created jar and it worked fine.
4) We saw the similar error in other environments and saw that /tmp/lib
folder is not present in the server as our open stack servers have a
retention policy of 15 days and after that it deletes the /tmp/ files. As
the /tmp/ files are deleted, Cassandra is still pointing to the deleted
trigger.jar and not allowing the application to insert the records into the
table and throwing the errors.
5) So we came to know like whenever we reloadtriggers, it is creating a new
jar file in /tmp/lib/ directory as *cassandra-8754700968157790389.jar *(numbers
keep changing) and using this jar file for reference but not using the jar
that we placed in /conf/triggers folder.
6) I just need to know where can I change that default location /tmp/lib it
is using for creating the jar files?
Whether I can change that directory location to something else and use for
my Cassandra servers alone?
If there is any other solution, it is highly appreciated.
Note: Our management doesn't want to change the /tmp/ directory retention
policy as it is common for all our servers in all the environments.