Hazelcast 专用节点

发布于 2024-12-01 17:13:59 字数 405 浏览 4 评论 0原文

在专用服务器上运行 Hazelcast 节点的最简单方法是什么?

我们有一个使用 Hazelcast 分布式地图的 Web 应用程序。 目前,Hazelcast 节点配置为在 Servlet 容器节点中运行。

随着规模的扩大,我们希望添加专用硬件作为 Hazelcast 节点。

然后我们将不再需要 Servlet 容器中的完整 Hazelcast 节点,这些节点可以是客户端。 (Servlet 容器有相关的许可成本,因此减轻它们的负载很好,不要问...)

所以问题是,最小的 Hazelcast 节点安装是什么?类似于 memcached 安装的东西。 它所需要做的就是读取配置并启动,无需本地客户端。

我看到它支持 Jetty,但是是否需要它,或者这些 jar 中有一些简单的类我可以在 JVM 原始上执行吗?

What is the simplest way to run Hazelcast nodes on dedicated servers?

We have a web application that uses a Hazelcast distributed map.
Currently the Hazelcast nodes are configured to run in the Servlet Container nodes.

As we scale up, we'd like to add dedicated hardware as Hazelcast nodes.

Then we won't need full Hazelcast nodes in the Servlet Containers anymore, those can be clients. (There are licensing costs associated with the Servlet Containers, so getting load off them is good, don't ask...)

So the question is, what's a minimal Hazelcast node installation? Something analogous to a memcached installation.
All it needs to do is read configuration and start up, no local clients.

I see it supports Jetty, but is that needed at all, or is there some simple class in those jars I could execute on a JVM raw?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

永言不败 2024-12-08 17:13:59

只需创建一个简单的类,调用 HazelCast.init

com.hazelcast.examples 包中有许多测试类,可以从 hazelcast 发行版的 bin 目录运行。

Just create a simple class that calls HazelCast.init

There are a number of test classes in the com.hazelcast.examples package which can be run from the bin directory of the hazelcast distribution.

寄意 2024-12-08 17:13:59

TL;DR

新版本:

java -cp hazelcast-3.7.2.jar com.hazelcast.core.server.StartServer

旧版本:

java -cp hazelcast- 2.0.3.jar com.hazelcast.examples.StartServer

这将启动一个独立的 Hazelcast 实例


如果您使用的是 Maven:

mvn -DgroupId=com.hazelcast -DartifactId=hazelcast -Dversion=3.7.2 dependency:get

cd ~/.m2/repository/com/hazelcast/hazelcast/3.7.2

将带您进入包含 jar 的文件夹

TL;DR

Newer version:

java -cp hazelcast-3.7.2.jar com.hazelcast.core.server.StartServer

Older version:

java -cp hazelcast-2.0.3.jar com.hazelcast.examples.StartServer

This will start a standalone Hazelcast instance


If you're using maven:

mvn -DgroupId=com.hazelcast -DartifactId=hazelcast -Dversion=3.7.2 dependency:get

cd ~/.m2/repository/com/hazelcast/hazelcast/3.7.2

will get you to the folder with the jar

梦开始←不甜 2024-12-08 17:13:59

您可以通过调用 {hazelcast-directory}/bin/server.sh 或在 Windows {hazelcast-directory}/bin/server.bat 上运行它。

配置文件仍然可以在 {hazelcast-directory}/bin/hazelcast.xml 中找到。

这是对 thSoft 答案的更新,因为这种方式不再有效。

You can get it to run by calling {hazelcast-directory}/bin/server.shor on Windows {hazelcast-directory}/bin/server.bat.

The configuration file can still be found in {hazelcast-directory}/bin/hazelcast.xml

This is an update to thSoft's answer as that way is no longer valid.

稚气少女 2024-12-08 17:13:59

您也可以简单地运行hazelcast/bin/start.sh(配置文件为hazelcast/bin/hazelcast.xml)。

You can also simply run hazelcast/bin/start.sh (the configuration file is hazelcast/bin/hazelcast.xml).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文