ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Mashenkov <andrey.mashen...@gmail.com>
Subject Re: Use of Ignition.allGrids()
Date Wed, 19 Apr 2017 10:08:16 GMT

There are number of methods with confising names.  Actually, gridName means
ignite instance name. It will be fixed in 2.0 release.

1. Ignition.allGrids() return local JVM node instances. If you need all
cluster nodes, see Ignite.cluster() method.
2. Both of you nodes belongs to same cluster as they found each other via
By default, cache is created in PARTITIONED mode and its data distributed
among grid nodes. That is why one nodes see cache created on other node.

If you need to create separate grids then DiscoverySPI should be configured
with certain IpFinder. See [1] for details.

[1] https://apacheignite.readme.io/docs/clustering

On Wed, Apr 19, 2017 at 12:55 PM, jpmoore40 <jonathan.moore@ca-cib.com>

> Hi,
> I'm a bit confused about the purpose of the Ignition.allGrids() method, and
> how also the naming of grids using the IgniteConfiguration works.
> I started a  node using Ignition.getOrStart() with an IgniteConfiguration
> with name set to grid1, then create a cache and add some values to it. I
> then start a second node with name grid2. In the process for this second
> node I call Ignition.allGrids() which returns a single Ignite grid instance
> with name grid2. That grid instance contains the cache I created in the
> first process.
> So my questions are:
> 1. Why does allGrids() not return two instances, one for grid1 and one for
> grid2?
> 2. Why does the grid2 instance contain the cache when it was created in
> grid1.
> I assumes that the grid name was to allow you to create separate
> partitioned
> grids and that the caches would only be available in the grid in which they
> are created, but this doesn't seem to be the case. So I'm not sure what the
> purpose of the grid name or the allGrids() method is (since it only ever
> seems to return the current instance).
> Thanks
> Jon
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Use-of-Ignition-allGrids-tp12071.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Best regards,
Andrey V. Mashenkov

View raw message