for(Entry<String, List<MetricInfo>> entry : metricMap.entrySet()) {
String taskId = entry.getKey();
List<MetricInfo> MetricList = entry.getValue();
try {
String component = clusterState.task_info(topologyId, Integer.valueOf(taskId)).getComponentId();
TaskMetricInfo taskMetricInfo = new TaskMetricInfo(taskId, component);
for(MetricInfo metricInfo : MetricList) {
taskMetricInfo.updateMetricData(metricInfo);
}