Package com.alibaba.jstorm.schedule.default_assign

Examples of com.alibaba.jstorm.schedule.default_assign.ResourceWorkerSlot


  }

  protected List<ResourceWorkerSlot> selectWorker(
      List<ResourceWorkerSlot> list, Comparator<ResourceWorkerSlot> c) {
    List<ResourceWorkerSlot> result = new ArrayList<ResourceWorkerSlot>();
    ResourceWorkerSlot best = null;
    for (ResourceWorkerSlot worker : list) {
      if (best == null) {
        best = worker;
        result.add(worker);
        continue;
View Full Code Here


    for (Entry<String, SupervisorInfo> entry : cluster.entrySet()) {
      supervisorId = entry.getKey();
      localSupervisor = entry.getValue();
    }
    int port = localSupervisor.getWorkerPorts().iterator().next();
    ResourceWorkerSlot worker = new ResourceWorkerSlot(supervisorId, port);
    worker.setTasks(new HashSet<Integer>(context.getAllTaskIds()));
    worker.setHostname(localSupervisor.getHostName());
    result.add(worker);
    return result;
  }
View Full Code Here

              topologyid, task);
          if (isTaskDead == true) {
            LOG.info("Found " + topologyid + ",taskid:" + task
                + " is dead");
           
            ResourceWorkerSlot resource = null;
            if (assignment != null)
              resource = assignment.getWorkerByTaskId(task);
            if (resource != null) {
              Date now = new Date();
              String nowStr = TimeFormat.getSecond(now);
              String errorInfo = "Task-" + task + " is dead on "
                  + resource.getHostname() + ":"
                  + resource.getPort() + ", " + nowStr;
              LOG.info(errorInfo);
                clusterState.report_task_error(topologyid, task, errorInfo);
            }
            needReassign = true;
          }
View Full Code Here

TOP

Related Classes of com.alibaba.jstorm.schedule.default_assign.ResourceWorkerSlot

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.