ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Schmitt <peter.schmitt....@gmail.com>
Subject Re: Non-cluster mode
Date Tue, 28 Jun 2016 18:09:52 GMT
Hi Val,

thank you for checking it!
I've switched to JDK8 and the issue disappeared.
I've to test it with the JDK version we need to use in production.
It would be great to hear whether there is a different approach to reach
the same or if it could be a side-effect due to the used config:

    //IgniteConfiguration + start as listed in the first mail

    CacheConfiguration<String, CustomEntry> offheapCacheConfig = new
CacheConfiguration<String, CustomEntry>()
        .setName(cacheName)
        .setCacheMode(CacheMode.LOCAL)
        .setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED)
        .setSwapEnabled(false)
        .setBackups(0);

    offheapCacheConfig.setOffHeapMaxMemory(...); //max. value loaded from a
config
    LruEvictionPolicy evictionPolicy = new LruEvictionPolicy();
    evictionPolicy.setMaxMemorySize(new
BigDecimal(offheapCacheConfig.getOffHeapMaxMemory() * 0.9).longValue());
    IgniteCache<String, CustomEntry> cache =
ignite.createCache(offheapCacheConfig);
    cache = cache.withExpiryPolicy(new AccessedExpiryPolicy(new
Duration(/*configured value*/)));


And to fill the cache the following code is used:

    try (IgniteDataStreamer<String, CustomEntry> stream =
ignite.dataStreamer(cache.getName())) {
        stream.allowOverwrite(true);
        //use stream#addData
    }

I hope that config makes sense and can't lead to the effect I described
initially.

Kind regards
Peter



2016-06-28 19:23 GMT+02:00 vkulichenko <valentin.kulichenko@gmail.com>:

> Hi Peter,
>
> Your code works fine for me. Can you please attach the log file?
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Non-cluster-mode-tp5959p5971.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Mime
View raw message