Datastax Cassandra Windows服务 [英] Datastax Cassandra Windows Service
问题描述
这可能是很简单,但它真的很烦人!当使用Cassandra.BAT文件时,我们可以通过所述bat文件中的JAVA_OPTS参数设置最小/最大堆大小;在哪里可以为Windows服务?我认为它使用prunsrv使用相同的bat文件启动Cassandra,但似乎不是这样,因为它不拾取任何设置的参数。
This is probably really simple, but it's really annoying! When using the Cassandra.BAT file, we can set the min / max heap size via the JAVA_OPTS parameter inside said bat file; where can we do that for the Windows Service? I thought it launched Cassandra using prunsrv using the same bat file but it seems that is not the case as it doesn't pick up any of the params set there.
谢谢
Allan
推荐答案
正确,prunsrv直接运行java进程不确定启动和停止服务将在使用通过bat的间接调用时工作良好)。您可以使用此位置(64位)更改注册表中的设置:
Correct, prunsrv runs the java process directly (not sure starting and stopping the service would work well when using an indirect invocation via bat). You can change the settings in the registry using this location (64 bit):
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache软件
Foundation\Procrun
2.0\DataStax_Cassandra_Community_Server\Parameters\Java\Options
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\DataStax_Cassandra_Community_Server\Parameters\Java\Options
您也可以使用这个(见下文),但我没有试过。它将追加该选项,因此Java应忽略之前提到的任何附加选项。不要使用--JvmOptions,因为这将替换现有的完整的选项集只是那个新的选项。
You could also use this (see below), but I haven't tried that. It will append the option, so Java should ignore the prior mention of any options you append. Do NOT use --JvmOptions, as that will replace the existing complete set of options with just that new option.
prunsrv.exe // US // DataStax_Cassandra_Community_Server ++ JvmOptions = -Xms2G
prunsrv.exe //US//DataStax_Cassandra_Community_Server ++JvmOptions=-Xms2G
这篇关于Datastax Cassandra Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!