Package com.alibaba.jstorm.task

Examples of com.alibaba.jstorm.task.TaskInfo


       
        for (Entry<String, TaskHeartbeat> entry : heartbeats.entrySet()) {
          taskId = entry.getKey();
            taskHb = entry.getValue();
           
            TaskInfo taskInfo = clusterState.task_info(topologyId, Integer.parseInt(taskId));
            if (taskInfo == null ) {
              LOG.warn("Task information can not be found in ZK for task-" + taskId);
              continue;
            }
            componentId = taskInfo.getComponentId();
           
            //update taskHb into the corresponding component map
            if (taskHb.getComponentType().equals("spout")) {
              commStatsInfo.addToSpoutList(componentId, taskId, taskHb);
            } else {
View Full Code Here


        parallelism = Math.min(maxParallelism, declared);
      }

      for (int i = 0; i < parallelism; i++) {
        cnt++;
        TaskInfo taskInfo = new TaskInfo((String) entry.getKey(), componentType);
        rtn.put(cnt, taskInfo);
      }
    }
    return cnt;
  }
View Full Code Here

      Map<Integer, TaskInfo> taskInfoList = clusterState.task_info_list(topologyId);
        List<TaskMetricInfo> taskMetricList = clusterState.get_task_metric_list(topologyId);     
        for(TaskMetricInfo taskMetricInfo : taskMetricList) {
          TaskMetricData taskMetricData = new TaskMetricData();
          NimbusUtils.updateTaskMetricData(taskMetricData, taskMetricInfo);
          TaskInfo taskInfo = taskInfoList.get(Integer.parseInt(taskMetricInfo.getTaskId()));
          String componentId = taskInfo.getComponentId();
          taskMetricData.set_component_id(componentId);
         
          topologyMetricInfo.add_to_task_metric_list(taskMetricData);
        }
       
View Full Code Here

    HashMap<Integer, String> rtn = new HashMap<Integer, String>();

    List<Integer> taks_ids = zkCluster.task_ids(topology_id);

    for (Integer task : taks_ids) {
      TaskInfo info = zkCluster.task_info(topology_id, task);
      if (info == null) {
        LOG.error("Failed to get TaskInfo of " + topology_id
            + ",taskid:" + task);
        continue;
      }
      String componentId = info.getComponentId();
      rtn.put(task, componentId);
    }

    return rtn;
  }
View Full Code Here

    HashMap<Integer, String> rtn = new HashMap<Integer, String>();

    List<Integer> taks_ids = zkCluster.task_ids(topology_id);

    for (Integer task : taks_ids) {
      TaskInfo info = zkCluster.task_info(topology_id, task);
      if (info == null) {
        LOG.error("Failed to get TaskInfo of " + topology_id
            + ",taskid:" + task);
        continue;
      }
      String componentType = info.getComponentType();
      rtn.put(task, componentType);
    }

    return rtn;
  }
View Full Code Here

    Map<Integer, TaskInfo> taskInfoList = new HashMap<Integer, TaskInfo>();
   
    List<Integer> taskIds = task_ids(topologyId);
   
    for (Integer taskId : taskIds) {
      TaskInfo taskInfo = task_info(topologyId, taskId);
      taskInfoList.put(taskId, taskInfo);
    }
   
    return taskInfoList;
  }
View Full Code Here

TOP

Related Classes of com.alibaba.jstorm.task.TaskInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.