[ https://issues.apache.org/jira/browse/IGNITE-1230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14693309#comment-14693309 ]
Anton Vinogradov commented on IGNITE-1230: ------------------------------------------ New implementation (IGNITE-1093) allows to check rebelancing state. For example you can check finished preloading or no when node stopped in this way: You have to get all syncFutures at new topology (when node stopped) and wait for them. IgniteInternalFuture f1 = ((GridCacheAdapter)grid(1).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture(); IgniteInternalFuture f2 = ((GridCacheAdapter)grid(2).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture(); stopGrid(0); //TODO: refactor to get futures by topology while (f1 == ((GridCacheAdapter)grid(1).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture() || f2 == ((GridCacheAdapter)grid(2).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture()) U.sleep(100); ((GridCacheAdapter)grid(1).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture().get(); ((GridCacheAdapter)grid(2).context().cache().internalCache(CACHE_NAME_DHT)).preloader().syncFuture().get(); I'm going to refactor this. This code is just initial implementation of this idea ;) and stopGrid(..) should be sync as StartGrid(..) in future. > Add a boolean flag that will indicate that rebalance in progress or not > ----------------------------------------------------------------------- > > Key: IGNITE-1230 > URL: https://issues.apache.org/jira/browse/IGNITE-1230 > Project: Ignite > Issue Type: Task > Components: cache > Affects Versions: ignite-1.4 > Reporter: Alexey Kuznetsov > Assignee: Anton Vinogradov > Fix For: ignite-1.4 > > > It will be useful in some cases to check single boolean flag instead of > looping over partitions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)