Search in sources :

Example 1 with ThreadDumpNotAccessibleException

use of org.ow2.proactive.resourcemanager.rmnode.ThreadDumpNotAccessibleException in project scheduling by ow2-proactive.

the class RMCore method getNodeThreadDump.

@Override
@ImmediateService
public StringWrapper getNodeThreadDump(String nodeUrl) {
    checkPermissionAndGetClientIsSuccessful();
    RMNode node;
    try {
        node = getAliveNodeOrFail(nodeUrl);
    } catch (RuntimeException e) {
        logger.warn("Could not get node thread dump for node " + nodeUrl + ": " + e.getMessage());
        throw new ThreadDumpNotAccessibleException(nodeUrl, e.getMessage());
    }
    String threadDump;
    try {
        threadDump = node.getNode().getThreadDump();
    } catch (ProActiveException e) {
        logger.error("Could not get node thread dump for node " + nodeUrl, e);
        throw new ThreadDumpNotAccessibleException(nodeUrl, "Failed fetching thread dump", e);
    }
    logger.debug("Thread dump for node " + nodeUrl + ": " + threadDump);
    return new StringWrapper(threadDump);
}
Also used : StringWrapper(org.objectweb.proactive.core.util.wrapper.StringWrapper) RMNode(org.ow2.proactive.resourcemanager.rmnode.RMNode) ThreadDumpNotAccessibleException(org.ow2.proactive.resourcemanager.rmnode.ThreadDumpNotAccessibleException) ProActiveException(org.objectweb.proactive.core.ProActiveException) ImmediateService(org.objectweb.proactive.annotation.ImmediateService)

Example 2 with ThreadDumpNotAccessibleException

use of org.ow2.proactive.resourcemanager.rmnode.ThreadDumpNotAccessibleException in project scheduling by ow2-proactive.

the class RMCore method getRMThreadDump.

@Override
@ImmediateService
public StringWrapper getRMThreadDump() {
    checkPermissionAndGetClientIsSuccessful();
    String threadDump;
    try {
        threadDump = this.nodeRM.getThreadDump();
    } catch (ProActiveException e) {
        logger.error("Could not get Resource Manager thread dump", e);
        throw new ThreadDumpNotAccessibleException(this.getUrl(), "Failed fetching thread dump", e);
    }
    logger.debug("Resource Manager thread dump: " + threadDump);
    return new StringWrapper(threadDump);
}
Also used : StringWrapper(org.objectweb.proactive.core.util.wrapper.StringWrapper) ThreadDumpNotAccessibleException(org.ow2.proactive.resourcemanager.rmnode.ThreadDumpNotAccessibleException) ProActiveException(org.objectweb.proactive.core.ProActiveException) ImmediateService(org.objectweb.proactive.annotation.ImmediateService)

Aggregations

ImmediateService (org.objectweb.proactive.annotation.ImmediateService)2 ProActiveException (org.objectweb.proactive.core.ProActiveException)2 StringWrapper (org.objectweb.proactive.core.util.wrapper.StringWrapper)2 ThreadDumpNotAccessibleException (org.ow2.proactive.resourcemanager.rmnode.ThreadDumpNotAccessibleException)2 RMNode (org.ow2.proactive.resourcemanager.rmnode.RMNode)1