ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilya Kasnacheev <ilya.kasnach...@gmail.com>
Subject Re: Port Assigned? Work on specific Node?
Date Mon, 16 Jul 2018 13:35:40 GMT
Hello!

If node1 and node2 are in the same cluster, they both have myCache and it
is distributed between them (in any case, caches are property of whole
cluster and not of an individual node)

It is only possible to manually copy records from cache in node1 to cache
in node2 when they do not belong to the same cluster.

Client node is connected to the whole cluster (if you indeed have just one
cluster) and will get data from both nodes, depending on which node has
this data ready. If for some reason data is not available immediately,
client will wait until it is.

Regards,

-- 
Ilya Kasnacheev

2018-07-16 16:28 GMT+03:00 monstereo <mehmetozanguven@gmail.com>:

> thanks, but this is not the answer that I expected,
> maybe this scenario can be more understandable:
>
> 10000 cache is in node1,
> okey, node2 is created and node2 has copy of the node1(and node2 will not
> be
> ready until copy is done!!)
> now in node2 there is cache which name is "myCache" and I iterates over
> node1 cache and i am putting datas to "myCache"
> when putting occuring, client node should not say myCache.get(9500), it
> should wait or i say to client, cache is not ready.
>
>
> Let's assume that client will always looks "myCache" not the node1 cache
>
>
> ilya.kasnacheev wrote
> > Hello!
> >
> > I have a feeling that you are trying to perform a manual sunset:
> > reimplement something which is a part of core functionality and always
> > provided out of box.
> >
> > * Apache Ignite will read values from primary node only unless
> > "readFromBackup" property is set.
> > * Anyway, Apache Ignite will not try to read values from partition on
> node
> > where it's not completely rebalanced yet.
> > * In general, Apache Ignite will make sure that you're getting relevant
> > and
> > fresh data from cache.
> >
> > Regards,
> >
> > --
> > Ilya Kasnacheev
> >
> > 2018-07-16 15:59 GMT+03:00 monstereo &lt;
>
> > mehmetozanguven@
>
> > &gt;:
> >
> >> thanks for your understanding,
> >> Last question,
> >> I want to use data rebalancing, because I have scenario like this:
> >>
> >> let's say node 1 has 10000 datas in its caches. (Which cache mode is
> >> REPLICATED)
> >> Now I will invoke another node2, then node2 will copy of node1's cache
> >> datas.
> >> But when copying occuring, if any client node wants to get data from
> >> cache
> >> via node2, I should say "cache is not ready" or node2 should be
> >> accessible
> >> after it has all datas.
> >>
> >> I though that I can use data rebalancing, that's why i am interested in
> >> events. But, a few minutes ago, I have noticed I can not get
> >> CacheRebalanceEVENT, because of replicated mode. (I can catch other
> >> events
> >> for example EVT_CACHE_OBJECT_PUT.
> >>
> >> Now what can i do?
> >>
> >> here is the cache events in xml file
> >>
> >>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> CACHE_OBJECT_PUT"/>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> CACHE_OBJECT_READ"/>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> >> CACHE_OBJECT_REMOVED"/>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> >> CACHE_REBALANCE_STARTED"/>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> >> CACHE_REBALANCE_PART_LOADED"/>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> >> CACHE_REBALANCE_STOPPED"/>
> >>
> > <util:constant
> >>
> >  static-field="org.apache.ignite.events.EventType.EVT_
> >> CACHE_REBALANCE_PART_UNLOADED"/>
> >>
> >>
> >>
> >> --
> >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
> >>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Mime
View raw message