Search in sources :

Example 31 with TcpDiscoveryNode

use of org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode in project ignite by apache.

the class CacheMetricsForClusterGroupSelfTest method testMetricsStatisticsEnabled.

/**
     * Test cluster group metrics in case of statistics enabled.
     */
public void testMetricsStatisticsEnabled() throws Exception {
    createCaches(true);
    populateCacheData(cache1, ENTRY_CNT_CACHE1);
    populateCacheData(cache2, ENTRY_CNT_CACHE2);
    readCacheData(cache1, ENTRY_CNT_CACHE1);
    readCacheData(cache2, ENTRY_CNT_CACHE2);
    awaitMetricsUpdate();
    Collection<ClusterNode> nodes = grid(0).cluster().forRemotes().nodes();
    for (ClusterNode node : nodes) {
        Map<Integer, CacheMetrics> metrics = ((TcpDiscoveryNode) node).cacheMetrics();
        assertNotNull(metrics);
        assertFalse(metrics.isEmpty());
    }
    assertMetrics(cache1);
    assertMetrics(cache2);
    destroyCaches();
}
Also used : ClusterNode(org.apache.ignite.cluster.ClusterNode) CacheMetrics(org.apache.ignite.cache.CacheMetrics) TcpDiscoveryNode(org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode)

Aggregations

TcpDiscoveryNode (org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode)31 ClusterNode (org.apache.ignite.cluster.ClusterNode)9 Ignite (org.apache.ignite.Ignite)8 UUID (java.util.UUID)7 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)7 IOException (java.io.IOException)6 IgniteSpiException (org.apache.ignite.spi.IgniteSpiException)5 ArrayList (java.util.ArrayList)4 DiscoveryEvent (org.apache.ignite.events.DiscoveryEvent)4 TcpDiscoveryVmIpFinder (org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder)4 Nullable (org.jetbrains.annotations.Nullable)4 Socket (java.net.Socket)3 SocketTimeoutException (java.net.SocketTimeoutException)3 CountDownLatch (java.util.concurrent.CountDownLatch)3 IgniteException (org.apache.ignite.IgniteException)3 Event (org.apache.ignite.events.Event)3 TcpDiscoveryJoinRequestMessage (org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryJoinRequestMessage)3 StreamCorruptedException (java.io.StreamCorruptedException)2 InetSocketAddress (java.net.InetSocketAddress)2 Collection (java.util.Collection)2