ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "slava.koptilin" <slava.kopti...@gmail.com>
Subject Re: Re: Where can we get the partition assignment of a Cache after the cluster changed?
Date Tue, 24 Oct 2017 12:29:30 GMT
Hi Aaron,

I just started a single Ignite node as follows:
        Ignite ignite =
Ignition.start("examples/config/example-ignite.xml");

        IgnitePredicate<Event> rebalanceEventLsnr = evt -> {
            System.out.println("Received event [evt=" + evt.name() + ",
evt=" + evt.toString());
            return true; // Continue listening.
        };
        ignite.events().localListen(rebalanceEventLsnr,
EventType.EVT_CACHE_REBALANCE_STOPPED,
EventType.EVT_CACHE_REBALANCE_STARTED);

        Thread.sleep(5000);
        IgniteCache cache =
ignite.getOrCreateCache(createCacheConfiguration("CacheA"));
        IgniteCache cache2 =
ignite.getOrCreateCache(createCacheConfiguration("CacheB"));

and got the following output:
[15:22:39,460][INFO ][exchange-worker-#31%null%][GridCacheProcessor] Started
cache [name=CacheA, mode=PARTITIONED]
Received event [evt=CACHE_REBALANCE_STARTED, evt=CacheRebalancingEvent
[cacheName=CacheA, part=-1, discoNode=TcpDiscoveryNode [...]]
Received event [evt=CACHE_REBALANCE_STOPPED, evt=CacheRebalancingEvent
[cacheName=CacheA, part=-1, discoNode=TcpDiscoveryNode [...]]
[15:22:39,478][INFO
][exchange-worker-#31%null%][GridCachePartitionExchangeManager] Skipping
rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1,
minorTopVer=1], evt=DISCOVERY_CUSTOM_EVT,
node=1ee1a908-2424-46b0-911b-0a2c70ad68e2]
[15:22:39,480][INFO ][exchange-worker-#31%null%][GridCacheProcessor] Started
cache [name=CacheB, mode=PARTITIONED]
Received event [evt=CACHE_REBALANCE_STARTED, evt=CacheRebalancingEvent
[cacheName=CacheA, part=-1, discoNode=TcpDiscoveryNode [...]]
Received event [evt=CACHE_REBALANCE_STOPPED, evt=CacheRebalancingEvent
[cacheName=CacheA, part=-1, discoNode=TcpDiscoveryNode [...]]
Received event [evt=CACHE_REBALANCE_STARTED, evt=CacheRebalancingEvent
[cacheName=CacheB, part=-1, discoNode=TcpDiscoveryNode [...]]
Received event [evt=CACHE_REBALANCE_STOPPED, evt=CacheRebalancingEvent
[cacheName=CacheB, part=-1, discoNode=TcpDiscoveryNode [...]]
[15:22:39,485][INFO
][exchange-worker-#31%null%][GridCachePartitionExchangeManager] Skipping
rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1,
minorTopVer=2], evt=DISCOVERY_CUSTOM_EVT,
node=1ee1a908-2424-46b0-911b-0a2c70ad68e2]

So, I see messages for both caches.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message