[ https://issues.apache.org/jira/browse/FLINK-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950189#comment-14950189 ]
ASF GitHub Bot commented on FLINK-2730: --------------------------------------- Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/1236#discussion_r41617865 --- Diff: flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/TaskManagersHandler.java --- @@ -54,10 +58,22 @@ public String handleRequest(Map<String, String> params) throws Exception { ActorGateway jobManager = retriever.getJobManagerGateway(); if (jobManager != null) { - Future<Object> future = jobManager.ask(JobManagerMessages.getRequestRegisteredTaskManagers(), timeout); - RegisteredTaskManagers taskManagers = (RegisteredTaskManagers) Await.result(future, timeout); - - final List<Instance> instances = new ArrayList<Instance>(taskManagers.asJavaCollection()); + // whether one task manager's metrics are requested, or all task manager, we + // return them in an array. This avoids unnecessary code complexity. + // If only one task manager is requested, we only fetch one task manager metrics. + final List<Instance> instances = new ArrayList<>(); + if (params.containsKey(TASK_MANAGER_ID_KEY)) { + InstanceID instanceID = new InstanceID(StringUtils.hexStringToByte(params.get(TASK_MANAGER_ID_KEY))); + Future<Object> future = jobManager.ask(new JobManagerMessages.RequestTaskManagerInstance(instanceID), timeout); + TaskManagerInstance instance = (TaskManagerInstance) Await.result(future, timeout); + if (instance.instance() != null) { --- End diff -- Not sure about the null check. Could check for InstanceNotFound message instead. > Add CPU/Network utilization graphs to new web dashboard > ------------------------------------------------------- > > Key: FLINK-2730 > URL: https://issues.apache.org/jira/browse/FLINK-2730 > Project: Flink > Issue Type: Sub-task > Components: Webfrontend > Affects Versions: 0.10 > Reporter: Stephan Ewen > Assignee: Sachin Goel > Fix For: 0.10 > > > The charts rendered in the previous dashboard should be added to the new web > dashboard. -- This message was sent by Atlassian JIRA (v6.3.4#6332)