Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Hazelcast
    @hazelcast_twitter
    [Rafal Leszko (unknown)] @Antonrodina TBH I think this should work fine. So I think you'd need to create a minimal project that reproduces the issue and share it. Otherwise it's hard to advise anything...
    Matko Medenjak
    @mmedenjak
    @mzcu can't find your message anymore regarding hazelcast.initial.min.cluster.size. I haven't used it myself much but as far as I remember, it's about delaying some processes like loading data from map store, until the desired number of instances have joined to form the cluster. If the value is zero, such processes may start as soon as you start using Hazelcast, causing unnecessary rebalancing, replication and migration once further instances start joining the cluster.
    There are some unintended behaviours that we might fix if you intend to use that property - hazelcast/hazelcast#14259
    Matko Medenjak
    @mmedenjak

    @StephenOTT I believe what the MapStore#storeAll method javadoc is trying to say is that, as you persist entries provided as the parameter Map<K, V> map, you should remove them from the provided map. If, at any point, the method throws an exception, the remaining entries in the provided map will be persisted one-by-one. So we're not talking about the usage of com.hazelcast.map.IMap, we're only talking about the remaining entries in the map provided as a parameter to the storeAll method.

    And yes, it's up to the implementation to provide batching.

    Marcos F. Lobo
    @marcosflobo
    @hazelcast_twitter Thanks Andrey, now it's clear!
    Antonrodina
    @Antonrodina

    I know see in the logs (the exception was being silently swallowed before)

    Exception in thread "main" com.hazelcast.config.InvalidConfigurationException: Invalid configuration 
    Caused by: com.hazelcast.config.properties.ValidationException: There is no discovery strategy factory to create 'DiscoveryStrategyConfig{properties={namespace=default}, className='com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy', discoveryStrategyFactory=null}' Is it a typo in a strategy classname? Perhaps you forgot to include implementation on a classpath?

    But I have hazelcast-kubernetes in my pom.xml

    Matko Medenjak
    @mmedenjak
    This all sounds to me like classpath and classloader issues
    Antonrodina
    @Antonrodina
    Yep, found the solution at hazelcast/hazelcast-kubernetes#61
    oğuz karakuş
    @karakus_oguz_twitter
    Hi All,
    is it possible to use a sort comparator for a map that contains json string, while using query predicates?
    I would like to use PagingPredicate, it has a constructor like below:
    PagingPredicate(Predicate<K, V> predicate, Comparator<Map.Entry<K, V>> comparator, int pageSize)
    So I need to use Comparator<Map.Entry<K, V>> comparator
    But my value is a string here. If I parse it to an object myself inside comparator, I doubt it would be efficient.
    Do you have a suggestion for me? Or should I give up on sorting for a json string?
    Stephen Russett
    @StephenOTT
    @mmedenjak think it would be a good javadoc update on that? Happy to do a little pr adjustment to indicate that it is assumed that records will be deleted from the provided map
    Re: the StoreAll() method javadoc
    Matko Medenjak
    @mmedenjak
    sure, if you're up for it, or I can get to it some of these days
    Can Gencer
    @cangencer
    for the Chinese-speaking Hazelcast users here, do you have any ideas where it would be a good idea to post technical content (for example, equivalent of Hacker News and so on)
    Matko Medenjak
    @mmedenjak
    @karakus_oguz_twitter the only idea that comes to mind is storing parsed json values into the map and using the in-memory format of OBJECT. That will affect how you store and retrieve values, though. Parsing inside the comparator will probably be very inefficient.
    sancar
    @sancar
    Hi Lukas @bossqone ,
    I have tried your setup with 3.12.7 and I get HazelcastClientOffline exception as expected.
    Your configuration seems correct for fail-fast behaviour. Do you have stack trace for OperationTimeoutException ?
    It could be related to version that you are using. Can you also share the version of your hazelcast client ?
    tall15421542
    @tall15421542
    @cangencer (1) https://ithelp.ithome.com.tw/questions (2) https://www.csdn.net/ If I want to find technical content in chinese language, I would browse these two sites. Also, Medium is very popular in Taiwan to share technical content =)
    Tomasz Gawęda
    @TomaszGaweda
    Hi everyone :) Do you recall any in-depth docs or presentations about various cluster configuration in Hazelcast? We have strange problem, where node scanning for TCP/IP members is finding other cluster (which uses multicast), rejects those nodes (that's ok and intended), but then also rejects nodes that belongs to his own cluster. If there's no multicast cluster in the same network, nodes are not rejected. Not sure if it's a bug or some tricky use case
    ihorpts
    @ihorpts

    hi everyone
    could somebody, please, explain the following fact - in Hazelcast 3.11.x I was able to retrieve some distributed objects like this:

    HazelcastInstance.getDistributedObject(com.hazelcast.collection.impl.queue.QueueService.SERVICE_NAME, myQueueName);
    HazelcastInstance.getDistributedObject(com.hazelcast.concurrent.lock.LockService.SERVICE_NAME_NAME, myLockName);

    but when I switched my project to Hazelcast 4.0 and having adopted the code to this:

     HazelcastInstance#getDistributedObject(com.hazelcast.cp.internal.datastructures.lock.LockService.SERVICE_NAME_NAME, myLockName);

    the app fails at runtime with an exception:
    java.lang.ClassCastException: class com.hazelcast.cp.internal.datastructures.lock.LockService cannot be cast to class com.hazelcast.internal.services.RemoteService (com.hazelcast.cp.internal.datastructures.lock.LockService and com.hazelcast.internal.services.RemoteService are in unnamed module of loader 'app')
    even though queue retrieval works just fine.
    The same issue I can see for AtomicLongService.SERVICE_NAME.
    If I refactor my code to HazelcastInstance.getCPSubsystem().getLock(myLockName) - it works just fine as well.

    What I did wrong?
    Thanks in advance...

    Matko Medenjak
    @mmedenjak
    @ihorpts in Hazelcast 4.0 the ILock, amongst others, has been removed in favour of the CP subsystem implementations - https://docs.hazelcast.org/docs/latest/manual/html-single/#removal-of-deprecated-concurrency-api-implementations
    oğuz karakuş
    @karakus_oguz_twitter
    @mmedenjak thank you for the answer
    ihorpts
    @ihorpts

    @mmedenjak thanks for your answer. Yes, I found it such as calling HazelcastInstance.getCPSubsystem().getLock(myLockName) returns me FencedLock instead of ILock. So my question is if any distributed object, which is now implemented under CP subsystem, can't be retrieved via HazelcastInstance interface:

    <T extends DistributedObject> T getDistributedObject(@Nonnull String serviceName, @Nonnull String name);

    anymore? Am I right?

    ihorpts
    @ihorpts
    @mmedenjak that's what I'm looking for! Thank you very much!
    Vassilis Bekiaris
    @vbekiaris
    @TomaszGaweda do your clusters share some member addresses? Also, can you post log lines from when a node that should belong to the cluster is rejected?
    ihorpts
    @ihorpts
    @mmedenjak I'm back just with a small remark - new CP raft base service names are in the master branch as I understood, which is 4.1. 4.0 branch has it is I showed it to you with old LockServcie.SERVICE_NAME - https://github.com/hazelcast/hazelcast/blob/4.0.z/hazelcast/src/main/java/com/hazelcast/cp/internal/CPSubsystemImpl.java:
        @Nonnull
        @Override
        public FencedLock getLock(@Nonnull String name) {
            checkNotNull(name, "Retrieving an fenced lock instance with a null name is not allowed!");
            return createProxy(LockService.SERVICE_NAME, name);
        }
    Matko Medenjak
    @mmedenjak
    ok, thanks
    ihorpts
    @ihorpts
    @mmedenjak I'm trying to debug it now but looks like that for CP subsystem retrieval has some flaw such as CPSubsystemImpl and HazelcastInstanceImpl (with ProxyServiceImpl delegation) have different implementations in regards of how DistributedObject is maintained.
    Could you agree with my assumption? If yes, then I can stop the analysis here and probably verify 4.1.0-SNAPSHOT version...
    Tomasz Gawęda
    @TomaszGaweda
    @vbekiaris yes, they are on the same 2 machines (our Jenkins machines). Will try to share logs after some cleaning
    murali474
    @murali474
    Hi,
    I am using spring boot with hazel cast cache. I got a requirement that i should disable cache based on some property (in application.properties) so that hazelcast server wont be started and i can enable cache on demand. I have googled about this but could not a get proper solution. I am hoping that this chat room will help me.
    Please suggest .
    mzcu
    @mzcu
    Anybody runs their instance on kubernetes/openshift? If so, do you use multicast or kubernetes networking?
    Hazelcast
    @hazelcast_twitter
    [Rafal Leszko (unknown)] @mzcu, for openshift/kubernetes, you can use Kubernetes Plugin: https://github.com/hazelcast/hazelcast-kubernetes. It's included in hazelcast-all
    [Rafal Leszko (unknown)] @murali474, "on demand", do you mean at the runtime? If not at the runtime, then I don't think there is any problem with that, it's all about your Bean configuration. You can have different CacheManager configuration depending on your input application.properties.
    murali474
    @murali474
    @hazelcast_twitter could you give me some examples for different CacheManager configuration depending on your input application.properties.?
    and I am also looking for cache disable at run time as well. Please suggest and apppreciate the help.
    I am not sure if there is an option to change it at runtime though
    spring.hazelcast.config is the only hazelcast parameter you can set at application.properties AFAIS. https://docs.spring.io/spring-boot/docs/2.0.x/reference/html/boot-features-hazelcast.html
    murali474
    @murali474
    Hi @mesutcelik , thanks for your reply.
    I have tried spring.cache.type=none but this feature just preventing cache to be happened i mean every request it takes as new request (even thoough enable caching annotation present) but in the background cache checks happen
    murali474
    @murali474
    And other thing is could some one let me know that if there is a option to evict cache from hazel management center?
    Andrey Pechkurov
    @puzpuzpuz
    @murali474 unfortunately, no. Management Center doesn't have this feature.
    murali474
    @murali474
    @puzpuzpuz Thanks for your reply.
    Andrey Pechkurov
    @puzpuzpuz

    BTW if you want to evict an IMap (not Cache) entry, you can use console for this purpose: https://docs.hazelcast.org/docs/management-center/4.0.1/manual/html/index.html#console

    It supports m.evict command which acts similar to IMap#evict() method.

    murali474
    @murali474
    ok thanks @puzpuzpuz I will check
    ihorpts
    @ihorpts

    hi everyone
    I have a question - is there some good advice how to implement a simple sequence Id generator (kind as the old IdGenerator from 3.x version) with default step, let's say 1 and possibility to init a seed number?

    Current FlakeIdGenerator provides uniqueness but I didn't find a way how to configure it to achieve a simple sequence generator out of it...

    Thank you in advance!

    Hazelcast
    @hazelcast_twitter
    [Andrey Pechkurov (Andrey)] You could use AtomicLong from CP Subsystem as a sequence generator. It comes at a certain cost required by the underlying Raft algorithm, but that's inevitable if you need to have a distributed sequence generator.
    https://docs.hazelcast.org/docs/4.0/manual/html-single/index.html#cp-subsystem
    [Andrey Pechkurov (Andrey)] Of course, due to its design FlakeIdGenerator will allow you to achieve higher throughput
    ihorpts
    @ihorpts
    thank you @hazelcast_twitter
    Stephen Russett
    @StephenOTT
    Is there any performance differences between a IQueue’s take() vs a Item event Listener?
    Stephen Russett
    @StephenOTT
    Is there a performance difference between single message purposed Topics? vs a generic topic that everyone consumes from?
    Use case is replies to a message/queue