Examples of assignment_info()


Examples of com.alibaba.jstorm.cluster.StormClusterState.assignment_info()

      for (Entry<String, StormBase> entry : bases.entrySet()) {

        String topologyId = entry.getKey();
        StormBase base = entry.getValue();

        Assignment assignment = stormClusterState.assignment_info(
            topologyId, null);
        if (assignment == null) {
          LOG.error("Failed to get assignment of " + topologyId);
          continue;
        }
View Full Code Here

Examples of com.alibaba.jstorm.cluster.StormClusterState.assignment_info()

      for (Entry<String, StormBase> entry : bases.entrySet()) {

        String topologyId = entry.getKey();
        StormBase base = entry.getValue();

        Assignment assignment = stormClusterState.assignment_info(
            topologyId, null);
        if (assignment == null) {
          LOG.error("Failed to get assignment of " + topologyId);
          continue;
        }
View Full Code Here

Examples of com.alibaba.jstorm.cluster.StormClusterState.assignment_info()

      topologyInfo.set_uptime_secs(TimeUtils.time_delta(base
          .getLanchTimeSecs()));
      topologyInfo.set_status(base.getStatusString());

      // get topology's Assignment
      Assignment assignment = stormClusterState.assignment_info(
          topologyId, null);
      if (assignment == null) {
        throw new TException("Failed to get StormBase from ZK of "
            + topologyId);
      }
View Full Code Here

Examples of com.alibaba.jstorm.cluster.StormClusterState.assignment_info()

    // unstoppedTasks are tasks which are alive on no supervisor's(dead)
    // machine
    Set<Integer> unstoppedTasks = new HashSet<Integer>();
    Set<Integer> deadTasks = new HashSet<Integer>();

    Assignment existingAssignment = stormClusterState.assignment_info(
        topologyId, null);
    if (existingAssignment != null) {
      aliveTasks = getAliveTasks(topologyId, allTaskIds);
      unstoppedTasks = getUnstoppedSlots(aliveTasks, supInfos,
          existingAssignment);
View Full Code Here

Examples of com.alibaba.jstorm.cluster.StormClusterState.assignment_info()

      for (String topologyId : code_ids) {
        deleteLocalTopology(topologyId);
      }

      for (String id : assignments_ids) {
        Assignment assignment = clusterState.assignment_info(id, null);
        downloadCodeFromMaster(assignment, id);
      }
    } catch (IOException e) {
      // TODO Auto-generated catch block
      LOG.error("Get stormdist dir error!", e);
View Full Code Here

Examples of com.alibaba.jstorm.cluster.StormClusterState.assignment_info()

        List<Integer> taskIds = clusterState.task_ids(topologyid);
        if (taskIds == null) {
          LOG.info("Failed to get task ids of " + topologyid);
          continue;
        }
        Assignment assignment = clusterState.assignment_info(
            topologyid, null);

        boolean needReassign = false;
        for (Integer task : taskIds) {
          boolean isTaskDead = NimbusUtils.isTaskDead(data,
View Full Code Here

Examples of com.alipay.bluewhale.core.cluster.StormClusterState.assignment_info()

    Set<Entry<String, StormBase>> basesEntry = bases.entrySet();
    for (Iterator<Entry<String, StormBase>> it = basesEntry.iterator(); it.hasNext();) {
      Entry<String, StormBase> entry = it.next();
      String stormId = entry.getKey();
      StormBase base = entry.getValue();
      Assignment assignment = stormClusterState.assignment_info(stormId,null);
      if (assignment != null) {
        HashSet<NodePort> workers = new HashSet<NodePort>();
        Collection<NodePort> entryColl = assignment.getTaskToNodeport().values();
        workers.addAll(entryColl);
        topologySummaries.add(new TopologySummary(stormId, base.getStormName(), assignment.getTaskToNodeport().size(),
View Full Code Here

Examples of com.alipay.bluewhale.core.cluster.StormClusterState.assignment_info()

   
    //���topology��name������ʱ���״̬
    StormBase base = stormClusterState.storm_base(topologyId, null);
   
    //���topology�����������Ϣ
    Assignment assignment = stormClusterState.assignment_info(topologyId,null);
   
    if (base != null && assignment != null) {
      List<TaskSummary> taskSummarys = new ArrayList<TaskSummary>();
      Set<Entry<Integer, String>> taskInfoSet = taskInfo.entrySet();
      for (Iterator<Entry<Integer, String>> it = taskInfoSet.iterator(); it.hasNext();) {
View Full Code Here

Examples of com.alipay.bluewhale.core.cluster.StormClusterState.assignment_info()

  }
  public static List<String> getStatus(String stormId) throws Exception
  {
    StormClusterState stat=GetShards.getCluster();
   
    Assignment ass=stat.assignment_info(stormId, null);
    Map<String, String> nodeHost=(ass==null)?(new HashMap<String, String>()):ass.getNodeHost();
    Map<Integer, Integer> taskStartTimeSecs=(ass==null)?(new HashMap<Integer, Integer>()):ass.getTaskStartTimeSecs();
    Map<Integer, NodePort> taskToNodeport=(ass==null)?(new HashMap<Integer, NodePort>()):ass.getTaskToNodeport();
   
   
View Full Code Here

Examples of com.alipay.bluewhale.core.cluster.StormClusterState.assignment_info()

      //��ȡ���е�supervisor�ڵ���Ϣ��
      Map<String, SupervisorInfo> supInfos = allSupervisorInfo(stormClusterState, callback);
      //��ȡ<supervisorid,hostname>map���ϣ����磺node->host {"4b83cd41-e863-4bd6-b26d-3e27e5ff7799" "dw-perf-3.alipay.net","b8f1664d-5555-4950-8139-5098fb109a81" "dw-perf-2.alipay.net"}
      Map<String, String> nodeHost = getNodeHost(supInfos);
      //��ȡָ��topologyid��assignment��Ϣ��
      Assignment existingAssignment = stormClusterState.assignment_info(topologyid, null);
      //�����ȡtopology�����Ӧ�µ�NodePort
 
     
      Map<Integer, NodePort> taskNodePort = computeNewTaskToNodePort(data,
          topologyid, existingAssignment, stormClusterState, callback,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.