cassandra 3.5无法加载触发器类 [英] cassandra 3.5 fails to load trigger class

查看:90
本文介绍了cassandra 3.5无法加载触发器类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图开始使用Cassandra触发器,但是我无法让Cassandra加载它们。我已经从此处此处,然后将其放在 C:\Program Files\DataStax-DDC\apache下-cassandra\conf\triggers 。我已经重新启动了 DataStax_DDC_Server 服务(在Windows上)并重新打开了CQLSH命令行,但是尝试在 create trigger 命令只给我:

I am trying to get started with Cassandra triggers, but I cannot get Cassandra to load them. I have built jar files from here and here, and put them under C:\Program Files\DataStax-DDC\apache-cassandra\conf\triggers. I have restarted the DataStax_DDC_Server service (on Windows) and reopened the CQLSH command line, but trying to use the trigger class in a create trigger command gives me only:

ConfigurationException: <ErrorMessage code=2300 [Query invalid because of configuration issue] message="Trigger class 'org.apache.cassandra.triggers.InvertedIndex' doesn't exist">

我检查了jar文件,其中包括了类文件。
我只能在cassandra的日志文件中找到触发器目录不存在,请创建该目录并重试。但我不知道如果相关的话。

I checked the jar files, and they include the class files. The only thing I could find in the log files of cassandra is Trigger directory doesn't exist, please create it and try again. But I don't know if that is relevant.

编辑:在显示的最后一行之后此处,我编辑了 cassandra.bat 文件。现在,如果我停止 DataStax_DDC_Server 服务并直接运行bat文件,则 create trigger 命令成功。但是,该服务似乎与该bat文件无关。现在的问题是如何将相同的配置应用于服务?

Following the last line shown here, I edited the cassandra.bat file. Now if I stop the DataStax_DDC_Server service and run the bat file directly, the create trigger command succeeds. Nevertheless, the service seems to be independent of this bat file. The question now is how to apply the same config to the service?

推荐答案

创造性地进行谷歌搜索后,我找到了一个解决方案。如此处所述,您需要明确设置 cassandra.triggers_dir 变量,但要服务选择它,如此处,则必须在注册表中进行配置。所以答案是更新注册表项

After googling creatively, I found a solution. As mentioned here you need to explicitly set the cassandra.triggers_dir variable, but for the service to pick it up, as explained here, you must configure it in the registry. So the answer is to update the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\DataStax_CDC_Server\Parameters\Java\Options

并添加行

-Dcassandra.triggers_dir=C:\Program Files\DataStax-DDC\apache-cassandra\conf\triggers

请注意,该路径不应用引号引起来,否则它将不起作用。
不要忘记重启服务。

Note that the path should not be enclosed in quotations, or it won't work. Don't forget to restart the service.

这篇关于cassandra 3.5无法加载触发器类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆