ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamal C <kamaltar...@gmail.com>
Subject Re: How do I know the cache rebalance is finished?
Date Tue, 30 Aug 2016 09:07:13 GMT
Bumping up this thread. I've a similar requirement. What is the outcome of
this thread ?

My cache re-balance mode is Synchronous. How to know the cache re-balance
is completed ?

-- Kamal

On Fri, Jun 24, 2016 at 2:25 PM, Vladislav Pyatkov <vldpyatkov@gmail.com>
wrote:

> Hello, Andrew.
>
> You are right.
>
> I have created issue https://issues.apache.org/jira/browse/IGNITE-3362.
> You can track issue in the JIRA ticket.
>
> On Fri, Jun 24, 2016 at 7:34 AM, Andrew <jkan@bistel.co.kr> wrote:
>
>> Hello, Denis.
>>
>> Did you check my sample code?
>>
>> And I have another question.
>> On testing with my sample code above,
>> when a new node is joined, as I don't complete executing received event,
>> ignite does not finish rebalance.
>> For example,
>> If I put a line of code to sample test code which I attached before like
>> below, then ignite does not complete rebalancing(more exactly, getting
>> affinity returns old partition information) until the event listener
>> thread
>> wakes up.
>>
>> I expected the event listener thread is a separated behavior against
>> rebalance process.
>> So, I'm confused now.
>> Am I thinking in a wrong way?
>> I need some advice.
>>
>>
>> =====================================
>>         if (isClient != null && !isClient
>>                 && cacheEvt.cacheName().equals(CACHE_NAME)
>>                 && (cacheEvt.discoveryEventType() ==
>> EventType.EVT_NODE_JOINED
>>                         || cacheEvt.discoveryEventType() ==
>> EventType.EVT_NODE_LEFT
>>                         || cacheEvt.discoveryEventType() ==
>> EventType.EVT_NODE_FAILED)) {
>>
>>                 //Rebalance has been finished?
>>                 System.out.println("Rebalance stopped.");
>>
>>
>> /*  //Put thread sleep
>>                 Thread.sleep(10000);*/
>>
>>
>>                 Affinity aff = ignite.affinity(CACHE_NAME);
>>                 int[] partitions = aff.primaryPartitions(ignite.
>> cluster().localNode());
>>                 System.out.println("Current partitions : " +
>> Arrays.toString(partitions));
>>
>> ===================================
>>
>> Sincerely,
>> Andrew
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.
>> 70518.x6.nabble.com/How-do-I-know-the-cache-rebalance-is-
>> finished-tp5219p5853.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Vladislav Pyatkov
>

Mime
View raw message