hazelcast

Configure Hazelcast CPSubsystem Retries Timeout

折月煮酒 提交于 2020-01-06 04:54:15
问题 Currently I have three instances registered in the CPSubsystem . ----- | I1* | * Leader ----- ---- ---- | I2 | | I3 | ---- ---- When all instances are up an running, all registered and seeing each other on the CPSubsystem everything is working as expected. The following call is used to perform distributed locks between all the instances: getHazelcastInstance().getCpSubsystem().getLock(lockDefinition.getLockEntryName()) I noticed an issue when two of these instances die, and there is no leader

Hazelcast master node election in EKS / AWS is possible?

江枫思渺然 提交于 2020-01-06 04:31:09
问题 We have a spring boot application running in physical boxes. Planning to migrate to EKS (AWS). We have hazelcast used for multiple purposes listed below. Is it possible to use hazelcast itself in AWS to make use of the same features.? Or should I used any other technology than using hazelcast itself ? Hazelcast is used for: 1. Master Election (of machines) 2. Caching (To keep some files sometimes and mainly to websocket messages and to transmit those whenever required) Master Election : It is

Hazelcast Distributed Lock with iMap

走远了吗. 提交于 2020-01-06 02:54:38
问题 We are currently using Hazelcast 3.1.5. I have a simple distributed locking mechanism that is supposed to provide thread safety across multiple JVM nodes. Code is pretty simple. private static HazelcastInstance hInst = getHazelcastInstance(); private IMap<String, Integer> mapOfLocks = null; ... ... mapOfLocks = hInst.getMap("mapOfLocks"); if (mapOfLocks.get(name) == null) { mapOfLocks.put(name,1); mapOfLocks.lock(name); } else { mapOfLocks.put(name,mapOfLocks.get(name)+1); } ... <STUFF

Two separate hazelcast clusters in kubernetes

安稳与你 提交于 2020-01-03 03:23:15
问题 For sharing events between the pods of two different services in a Kubernetes namespace, I intend to use Hazelcast. This is not a problem, however, each service also has a cluster that contains all its pods. So, I have two clusters using the same pods. I achieved separation of the clusters by setting a group name for one of the clusters, while the other has the default group configuration. This works fine locally, with multiple instances of a test application. However, this is with multicast

AuthenticationException from Hazelcast client

倖福魔咒の 提交于 2020-01-03 02:55:11
问题 When I am trying to connect Hazelcast server through client, it gives me following exeption. com.hazelcast.client.AuthenticationException: Invalid credentials! at com.hazelcast.client.spi.impl.ClusterListenerSupport$ManagerAuthenticator.authenticate(ClusterListenerSupport.java:153) at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl.authenticate(ClientConnectionManagerImpl.java:249) at com.hazelcast.client.connection.nio.ClientConnectionManagerImpl.initializeConnection

Configuring a two node hazelcast cluster - avoiding multicast

偶尔善良 提交于 2019-12-31 15:47:06
问题 The context Two nodes of a Hazelcast cluster, each on a discrete subnet so multicast is not suitable nor working for node location. I should like to employ the most minimal XML configuration file, say hazelcast.xml , to configure Hazelcast to use TCP/IP to connect the two nodes. Ideally a directory of the IP addresses of the two nodes. The question The Hazelcast docs do a good job of showing how this can be achieved programatically, and how hazelcast.jar/hazelcast-default.xml holds the

Configuring a two node hazelcast cluster - avoiding multicast

為{幸葍}努か 提交于 2019-12-31 15:45:16
问题 The context Two nodes of a Hazelcast cluster, each on a discrete subnet so multicast is not suitable nor working for node location. I should like to employ the most minimal XML configuration file, say hazelcast.xml , to configure Hazelcast to use TCP/IP to connect the two nodes. Ideally a directory of the IP addresses of the two nodes. The question The Hazelcast docs do a good job of showing how this can be achieved programatically, and how hazelcast.jar/hazelcast-default.xml holds the

How to show all current locks in hazelcast

浪子不回头ぞ 提交于 2019-12-31 02:56:06
问题 I am a newbie for Hazelcast. I would like to know how can I list current lock in Hazelcast console? For ex. assume that i open three console and i have taken 3 lock as follow: m.lock object1 m.lock object2 m.lock object3 How can i get output like: number of lock site: 3 locks: object1, object2, object3 回答1: Console is just a test app to simulate basic functionalities of hazelcast. To see your lock instances following code will help you. HazelcastInstance hzInstance = Hazelcast

How to configure Hazelcast for session caching using spring while limiting it to a set of nodes?

余生颓废 提交于 2019-12-30 05:25:10
问题 I need to set up Hazelcast session caching using Spring. Using the configuration from the hazelcast docs is simple. However, its insufficient. I need to use a different configuration file for each one of my environments (DEV, QA, PROD). Alternatively (Ideally), I would like to use several properties from a spring bean that would be set during the initialization of the spring container. According to the hazelcast documentation, all I need to do set a group for each of my environments. like so:

Hazelcast in multinode docker environments with TCPIP

别说谁变了你拦得住时间么 提交于 2019-12-30 03:24:05
问题 I am currently struggling with the following problem: I have a Java EE application that shall be able to run in a cluster (it actually does). For the data exchange between the nodes I use Hazelcast 3.3.3. Since our customers are afraid of UDP we use TCP. So I configure 3 hazelcast parameters per node: The network interface to use, the port and the members of the cluster. In real life (not a docker environment) everything works. Now I want to put my Java EE servers into docker containers (one