Search in sources :

Example 1 with IgniteMXBean

use of org.apache.ignite.mxbean.IgniteMXBean in project ignite by apache.

the class IgniteFailoverAbstractBenchmark method onException.

/**
 * {@inheritDoc}
 */
@Override
public void onException(Throwable e) {
    // Proceess only the first exception to prevent a multiple printing of a full thread dump.
    if (firtsExProcessed.compareAndSet(false, true)) {
        // Debug info on current client.
        println("Full thread dump of the current node below.");
        U.dumpThreads(null);
        println("");
        ((IgniteMXBean) ignite()).dumpDebugInfo();
        // Debug info on servers.
        Ignite ignite = ignite();
        ClusterGroup srvs = ignite.cluster().forServers();
        ignite.compute(srvs).broadcastAsync(new ThreadDumpPrinterTask(ignite.cluster().localNode().id(), e)).get(10_000);
    }
}
Also used : IgniteMXBean(org.apache.ignite.mxbean.IgniteMXBean) ClusterGroup(org.apache.ignite.cluster.ClusterGroup) Ignite(org.apache.ignite.Ignite)

Example 2 with IgniteMXBean

use of org.apache.ignite.mxbean.IgniteMXBean in project ignite by apache.

the class GridMBeanSelfTest method testIgniteKernalReturnsValidMBeanInfo.

/**
 * Tests correct MBean interface.
 *
 * @throws Exception Thrown if test fails.
 */
public void testIgniteKernalReturnsValidMBeanInfo() throws Exception {
    try {
        IgniteMXBean ignite = (IgniteMXBean) startGrid();
        assertNotNull(ignite.getUserAttributesFormatted());
        assertNotNull(ignite.getLifecycleBeansFormatted());
    } finally {
        stopAllGrids();
    }
}
Also used : IgniteMXBean(org.apache.ignite.mxbean.IgniteMXBean)

Aggregations

IgniteMXBean (org.apache.ignite.mxbean.IgniteMXBean)2 Ignite (org.apache.ignite.Ignite)1 ClusterGroup (org.apache.ignite.cluster.ClusterGroup)1