Search in sources :

Example 1 with WorkerClient

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

the class WorkerThreadStackBlock method render.

@Override
protected void render(Block html) {
    set(TITLE, join("Angel WorkerThreadStack ", $(WORKER_ATTEMPT_ID)));
    try {
        WorkerAttemptId workerAttemptId = new WorkerAttemptId($(WORKER_ATTEMPT_ID));
        WorkerClient workerClient = null;
        LOG.info("start init WorkerClient");
        workerClient = new WorkerClient(amContext, workerAttemptId);
        String info = workerClient.getThreadStack();
        html.pre()._(info)._();
    } catch (IOException | UnvalidIdStrException | ServiceException e) {
        LOG.error("get stack for " + $(WORKER_ATTEMPT_ID) + " failed, ", e);
    }
}
Also used : ServiceException(com.google.protobuf.ServiceException) WorkerClient(com.tencent.angel.master.client.WorkerClient) WorkerAttemptId(com.tencent.angel.worker.WorkerAttemptId) IOException(java.io.IOException) UnvalidIdStrException(com.tencent.angel.exception.UnvalidIdStrException)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 UnvalidIdStrException (com.tencent.angel.exception.UnvalidIdStrException)1 WorkerClient (com.tencent.angel.master.client.WorkerClient)1 WorkerAttemptId (com.tencent.angel.worker.WorkerAttemptId)1 IOException (java.io.IOException)1