Replicated cache partition size

2019-08-26 Thread Niels Ejrnæs
Hi,

Is there a particular reason for why replicated caches has their partition size 
set to 512 by default?
I found this in 
org.apache.ignite.internal.processors.cache.GridCacheUtils#initializeConfigDefaults(IgniteLogger,
 CacheConfiguration, CacheObjectContext):V

if (cfg.getAffinity() == null) {
  ...
else if (cfg.getCacheMode() == REPLICATED) {
RendezvousAffinityFunction aff = new 
RendezvousAffinityFunction(false, 512);

cfg.setAffinity(aff);

cfg.setBackups(Integer.MAX_VALUE);
}

The default partition size for the RendezvousAffinityFunction is 1024.

Best regards
Niels Elkjær Ejrnæs



RE: AtomicReference issue with different userVersions

2019-08-12 Thread Niels Ejrnæs
Hey

I've created https://issues.apache.org/jira/browse/IGNITE-12058 for tracking 
this.

Best regards
Niels Elkjær Ejrnæs
Software Developer R&D

From: Ilya Kasnacheev 
Sent: 9. august 2019 18:54
To: user@ignite.apache.org
Subject: Re: AtomicReference issue with different userVersions

Hello!

This looks like a bug to me. Can you file a ticket against Apache Ignite JIRA?

Otherwise, I recommend returning data structures by their name from compute, as 
a workaround.

Regards,
--
Ilya Kasnacheev




RE: Running Ignite Cluster using Docker containers

2019-08-11 Thread Niels Ejrnæs
I ran Multicast in the beginning as well, but the overlay network in Docker 
Swarm does not support Multicast. So I had to drop it and use the 
TcpDiscoveryVmIpFinder. Our containers register themselves in a shared 
key-value database (etcd) upon startup and remove themselves on shutdown. We 
then populate the addresses from this registry runtime. Works so far.

Best regards
Niels Elkjær Ejrnæs
Software Developer R&D


RE: Running Ignite Cluster using Docker containers

2019-08-09 Thread Niels Ejrnæs
Hello

We're testing out Ignite and are running them in Docker as well. It's a bit 
tricky to get to work.
Keep in mind that referencing localhost inside a docker container is pointing 
them against their internal address. Not the host address of your machine. So 
that's why they aren't discovering eachother.

There are some options I can suggest:
  1. Create a docker network and attach your containers to this network. Then 
you can add them to your addresses list by their container name. This is what 
we are currently doing.
  2. Run them with --network host. Then you can use "localhost" as this will 
now be your host machine. In my opinion it kinda defeats the point of running 
it on Docker, but this is where I have had the best results.

Best regards
Niels Elkjær Ejrnæs
Software Developer R&D






-Original Message-
From: vitalys  
Sent: 8. august 2019 20:22
To: user@ignite.apache.org
Subject: RE: Running Ignite Cluster using Docker containers


   
  

 
   
  
  

  localhost:47500..47504 
   

  
   

  
 



--
Sent from: 
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-ignite-users.70518.x6.nabble.com%2F&data=02%7C01%7CNiels.Ejrnaes%40enghouse.com%7C30bb112adffb4afedc3a08d71c2d558e%7C427e40023c0240489e280eba58b331f4%7C1%7C1%7C637008853347767016&sdata=42KDcTU9%2FS%2ButBA7qRkPgeW%2BKo1zfP1N1zo4bmXgzBc%3D&reserved=0


RE: AtomicReference issue with different userVersions

2019-08-09 Thread Niels Ejrnæs
Hello Ilya :)

Here it is. It contains two projects server-node and client-node. I'm gonna 
have to rephrase what works and what doesn't. Now I can't even return the 
AtomicLong/Reference objects through the compute task. I have to unpack them 
first.

Run the main for ServerNode to start the server node.
Then you can run the ClientNode main to see the Exceptions I get.

Best regards
Niels Elkjær Ejrnæs

From: Ilya Kasnacheev 
Sent: 8. august 2019 15:54
To: user@ignite.apache.org
Subject: Re: AtomicReference issue with different userVersions

Hello!

Can you throw together a small reproducer project for this behavior?

Regards,
--
Ilya Kasnacheev


чт, 8 авг. 2019 г. в 16:44, Niels Ejrnæs 
mailto:niels.ejrn...@enghouse.com>>:
Hey all,

Am I wrong in assuming I can do this directly when running a client with a 
different userVersion?
  IgniteAtomicLong atomicLong = ignite.atomicLong("long", 0, false);

I get this Exception when running DeploymentMode CONTINUOUS and trying to 
access either AtomicReferences or AtomicLongs.

Exception in thread "clientNode" class org.apache.ignite.IgniteException: 
Failed to start continuous query.
   at 
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1026)
   at 
org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3719)
   at 
org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3705)
   at 
nee.ContinuousDeploymentTest$ClientNode.run(ContinuousDeploymentTest.java:74)
   at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start 
continuous query.
   at 
org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(CacheContinuousQueryManager.java:761)
   at 
org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(CacheContinuousQueryManager.java:597)
   at 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(DataStructuresProcessor.java:218)
   at 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:547)
   at 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(DataStructuresProcessor.java:463)
   at 
org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3716)
   ... 3 more
Caused by: class org.apache.ignite.internal.IgniteDeploymentCheckedException: 
Failed to obtain deployment for class: 
org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(GridContinuousProcessor.java:1357)
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(GridContinuousProcessor.java:111)
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:203)
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:194)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:727)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.lambda$onDiscovery$0(GridDiscoveryManager.java:604)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2667)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2705)
   at 
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
   ... 1 more

PS:
It works if I fetch it via an IgniteCallable, but don't know if this is the 
intended way.
  IgniteAtomicLong remoteAtomicLong = ignite.compute().call(() -> { return 
ignite.atomicLong("long", 0, false); });


Best regards
Niels Elkjær Ejrnæs
Software Developer R&D



ignite-playground.tar.gz
Description: ignite-playground.tar.gz


AtomicReference issue with different userVersions

2019-08-08 Thread Niels Ejrnæs
Hey all,

Am I wrong in assuming I can do this directly when running a client with a 
different userVersion?
  IgniteAtomicLong atomicLong = ignite.atomicLong("long", 0, false);

I get this Exception when running DeploymentMode CONTINUOUS and trying to 
access either AtomicReferences or AtomicLongs.

Exception in thread "clientNode" class org.apache.ignite.IgniteException: 
Failed to start continuous query.
   at 
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1026)
   at 
org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3719)
   at 
org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3705)
   at 
nee.ContinuousDeploymentTest$ClientNode.run(ContinuousDeploymentTest.java:74)
   at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to start 
continuous query.
   at 
org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeQuery0(CacheContinuousQueryManager.java:761)
   at 
org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.executeInternalQuery(CacheContinuousQueryManager.java:597)
   at 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.startQuery(DataStructuresProcessor.java:218)
   at 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.getAtomic(DataStructuresProcessor.java:547)
   at 
org.apache.ignite.internal.processors.datastructures.DataStructuresProcessor.atomicLong(DataStructuresProcessor.java:463)
   at 
org.apache.ignite.internal.IgniteKernal.atomicLong(IgniteKernal.java:3716)
   ... 3 more
Caused by: class org.apache.ignite.internal.IgniteDeploymentCheckedException: 
Failed to obtain deployment for class: 
org.apache.ignite.configuration.CacheConfiguration$IgniteAllNodesPredicate
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.processStartRequest(GridContinuousProcessor.java:1357)
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor.access$400(GridContinuousProcessor.java:111)
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:203)
   at 
org.apache.ignite.internal.processors.continuous.GridContinuousProcessor$2.onCustomEvent(GridContinuousProcessor.java:194)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.onDiscovery0(GridDiscoveryManager.java:727)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$4.lambda$onDiscovery$0(GridDiscoveryManager.java:604)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2667)
   at 
org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2705)
   at 
org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
   ... 1 more

PS:
It works if I fetch it via an IgniteCallable, but don't know if this is the 
intended way.
  IgniteAtomicLong remoteAtomicLong = ignite.compute().call(() -> { return 
ignite.atomicLong("long", 0, false); });


Best regards
Niels Elkjær Ejrnæs
Software Developer R&D

[cid:image006.png@01CFD272.B971A050]

M: +45 2971 9570  I  E: 
niels.ejrn...@enghouse.com
web: www.enghousenetworks.com

Enghouse is listed on the Toronto Stock Exchange (TSX:ESL)

Office: +45 7025 1411
Address: Lautrupvang 12
DK-27 50 Ballerup, Denmark