hazelcast

Configuring Hazelcast to prevent heartbeat issues

僤鯓⒐⒋嵵緔 提交于 2019-12-13 02:59:24
问题 I am running hazelcast (3.7.2). It is split into client node and a server node. A client can upload files, which gets put into an IQueue to be picked up by an Item listener on the server side. The problem is, the item listeners are not picking up those items straight away because the system is "not healthy". I believe this could be due to the way memory is being used and garbage collection is struggling. This is the message I get. processors=32, physical.memory.total=295.7G, physical.memory

Hazelcast Portable serialization

假装没事ソ 提交于 2019-12-13 02:37:02
问题 I want to use Portable serialization for objects stored in IMap to achieve: fast indexing during insertion (without deserializing objects and reflection) class evolution (versioning) Is it possible to store my classes without implementing Portable interface? Is it possible to store 3rd party classes like Date or BigDecimal (or with nested structure) which can not implement Portable interface, while still being indexable? 回答1: You can achieve fast indexing using Portable, yes. You'll also see

Using Predicate to search a keyset in Hazelcast

心不动则不痛 提交于 2019-12-13 00:39:55
问题 I'm new to Hazelcast - evaluating and prototyping to see if it fits our distributed memory cache needs. One of the requirements was to be able to use wild cards to search for keys in a given map. Looking through the IMap documentation, looks like keySet(Predicate predicate) can be used. But I couldn't figure how to use the Predicate in such a way that given a wild card string, a keySet is returned containing all keys that match. An example will be helpful. A snippet of my code. This is the

Hazelcast + Hibernate + Spring in Payara/Glassfish environment: Type id must be positive! Current: -202

不羁岁月 提交于 2019-12-12 22:15:39
问题 I want to use Hazelcast as 2nd Level Cache Provider. When I start my application local as Spring it works fine. But when I create an EAR to deploy and run on Payara (Glassfish), I get the error Caused by: java.lang.IllegalArgumentException: Type id must be positive! Current: -203, Serializer: com.hazelcast.hibernate.serialization.Hibernate42CacheEntrySerializer@7f08093f at com.hazelcast.nio.serialization.SerializationServiceImpl.register(SerializationServiceImpl.java:416) at com.hazelcast.nio

Hazelcast file persistence (MapStore implementation)

拈花ヽ惹草 提交于 2019-12-12 21:55:02
问题 I am using Hazelcast for clustered data distribution. I read in the documentation about data persistence, using the interfaces MapStore and MapLoader. I need to implement these interfaces and write the class name in the hazelcast.xml file. Is there any example of implementation of these interfaces for file persistence with hazelcast? Does anyone know about any source code or jar file that I can download and work with? Thanks 回答1: You can implement your own just using ObjectOutputStream and

Does Hazelcast honor a default cache configuration

时光怂恿深爱的人放手 提交于 2019-12-12 17:35:51
问题 In the hazelcast documentation there are a few brief references to a cache named "default" - for instance, here: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#jcache-declarative-configuration Later, there is another mention of cache default configuration here: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#icache-configuration What I would like is to be able to configure "default" settings that are inherited when caches are created. For instance, given the

hazelcast - is there a way to iterate over a map keys and/or values to query

我怕爱的太早我们不能终老 提交于 2019-12-12 17:21:20
问题 I have an class that has a map as one of its fields. Is there a way in Hazelcast using predicates to query for object where the key in the map has the values I am looking for? 回答1: Queries on maps are not yet implemented (as they are out of the box for lists / arrays). It is, however, possible to implement your own ValueExtractor to extract the values from the map based on your key. http://docs.hazelcast.org/docs/3.8/manual/html-single/index.html#custom-attributes 来源: https://stackoverflow

Is there a possibility to keep a single map store and use for multiple maps in hazelcast

纵饮孤独 提交于 2019-12-12 13:27:15
问题 Currently am using Hazelcast and persistence database as Hbase, So far I have 10 maps, for each map am using a map store, So Am using 10 mapstore classes (i.e) In all the 10 classes am implementing the MapStore. It creates a complexity in maintenance. So What I did is, I kept a generic map store and implemented the same class for all the maps, It has the ability to accept it, To make it clear, I did something like Map1 - com.test.GenericMapStore Map2 - com.test.GenericMapStore Map3 - com.test

java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor

依然范特西╮ 提交于 2019-12-12 13:08:51
问题 I am getting the following exception when trying to deploy the :mancenter-3.1.3.war in to my Weblogic 12. The fullstacktrace is : org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managementCenterContext' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'centralManager' while setting bean property 'centralManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error

Persisting data on disk using Hazelcast

我怕爱的太早我们不能终老 提交于 2019-12-12 08:30:36
问题 I have installed HazelCast 2.5. I want to persist my records into disk. I learned that MapStore does this job. However i'm not sure how to implement MapStore. Code i've written so far: public class MyMaps implements MapStore<String,String> { public static Map<Integer, String> mapCustomers = Hazelcast.getMap("customers"); public static void main(String[] args) { { mapCustomers.put(1, "Ram"); mapCustomers.put(2, "David"); mapCustomers.put(3, "Arun"); } } How do i put all these entries into disk