简体   繁体   English

使用HazelCast的水平聚类

[英]Horizontal Clustering using HazelCast

    I am using hazelCast-3.0 jars . I am able to create vertical cluster(on the same System where only port no. differ from one server to other Ip remains the same.) and its working  pretty good.But i want to create horizontal cluster(where i can use any ip address along with any port no. depending on the configuration). If this is possible in hazelCast then please share how. i went through several links like http://www.hazelcast.com/docs/1.9.4/manual/multi_html/ch11.html
    if this link is useful the suggest me how. I made only change to hazelcast.xml.
    <tcp-ip enabled="true">
                    <hostname>172.22.65.111</hostname>
                    <hostname>172.22.68.19</hostname>
                    <interface>172.22.*.*</interface>               
                </tcp-ip>

On both the system same jar file are being used.It i create a map name "xyz" and store some value to it .Then it should be available to other system with same map name "xyz". 在两个系统上,都使用了相同的jar文件。它创建一个映射名称“ xyz”并向其中存储一些值。然后它应可用于其他具有相同映射名称“ xyz”的系统。 here is the code that I am using on my system clientConfig.addAddress("172.22.65.111:5701"); 这是我在系统上使用的代码clientConfig.addAddress(“ 172.22.65.111:5701”); System.out.println("p2"); System.out.println(“ p2”); HazelcastInstance client = HazelcastClient .newHazelcastClient(clientConfig); HazelcastInstance客户端= HazelcastClient .newHazelcastClient(clientConfig);

            IMap<Integer, String> map = client.getMap("m");
            map.put(1,"ram");

Same code is on the second system also except ip and port. 除ip和port外,第二个系统上的代码也相同。 And insteed of put i am trying to get on the other system. 并建议我尝试使用其他系统。

your link refers to an outdated Version of the Manual. 您的链接是指手册的过时版本。 If you follow the getting started guide at 如果您遵循入门指南,请访问

http://www.hazelcast.com/docs/3.0/manual/single_html/#GettingStarted http://www.hazelcast.com/docs/3.0/manual/single_html/#GettingStarted

you should be able to form a horizontal cluster by starting the sample code on two separate machines. 您应该能够通过在两台单独的计算机上启动示例代码来形成水平集群。

The current hazelcast distribution also contains a bin folder with sample applications. 当前的hazelcast发行版还包含带有示例应用程序的bin文件夹。

I find a new in memory grid based on hazelcast 3.0 clone-griddatamaster.(griddatamaster.wordpress.com) They claim they will provide enterprise class future like security,management console...and some cool futures from gigaspace and oracle coherence 我发现基于hazelcast 3.0的内存网格中的一个新副本clone-griddatamaster。(griddatamaster.wordpress.com)他们声称他们将提供企业级的未来,例如安全性,管理控制台...以及来自gigaspace和oracle一致性的一些不错的未来

griddatamaster.wordpress.com griddatamaster.wordpress.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM