Search in sources :

Example 1 with PSClient

use of com.tencent.angel.master.client.PSClient in project angel by Tencent.

the class ParameterServerThreadStackBlock method render.

@Override
protected void render(Block html) {
    set(TITLE, join("Angel ParameterServerThread ", $(PSATTEMPT_ID)));
    PSAttemptId psAttempttId = null;
    try {
        psAttempttId = new PSAttemptId($(PSATTEMPT_ID));
    } catch (UnvalidIdStrException e) {
        LOG.error("unvalid id string, ", e);
        return;
    }
    try {
        LOG.info("start init PSClient");
        PSClient psClient = new PSClient(amContext, psAttempttId);
        String info = psClient.getThreadStack();
        html.pre()._(info)._();
    } catch (IOException | ServiceException e) {
        LOG.error("get thread stack from ps " + psAttempttId + " failed. ", e);
    }
}
Also used : PSAttemptId(com.tencent.angel.ps.PSAttemptId) ServiceException(com.google.protobuf.ServiceException) PSClient(com.tencent.angel.master.client.PSClient) IOException(java.io.IOException) UnvalidIdStrException(com.tencent.angel.exception.UnvalidIdStrException)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 UnvalidIdStrException (com.tencent.angel.exception.UnvalidIdStrException)1 PSClient (com.tencent.angel.master.client.PSClient)1 PSAttemptId (com.tencent.angel.ps.PSAttemptId)1 IOException (java.io.IOException)1