Package backtype.storm.scheduler

Examples of backtype.storm.scheduler.TopologyDetails


        Integer cpu = null;
        Integer mem = null;
        // TODO: maybe this isn't the best approach. if a topology raises #cpus keeps failing,
        // it will mess up scheduling on this cluster permanently
        for(String id: topologiesMissingAssignments) {
            TopologyDetails details = topologies.getById(id);
            int tcpu = MesosCommon.topologyCpu(_conf, details);
            int tmem = MesosCommon.topologyMem(_conf, details);
            if(cpu==null || tcpu > cpu) {
                cpu = tcpu;
            }
View Full Code Here


                    Offer offer = _offers.get(id);
                    if(id!=null) {
                        if(!toLaunch.containsKey(id)) {
                            toLaunch.put(id, new ArrayList());
                        }
                        TopologyDetails details = topologies.getById(topologyId);
                        int cpu = MesosCommon.topologyCpu(_conf, details);
                        int mem = MesosCommon.topologyMem(_conf, details);
                       
                        Map executorData = new HashMap();
                        executorData.put(MesosCommon.SUPERVISOR_ID, slot.getNodeId() + "-" + details.getId());
                        executorData.put(MesosCommon.ASSIGNMENT_ID, slot.getNodeId());
                       
                        String executorDataStr = JSONValue.toJSONString(executorData);
                        LOG.info("Launching task with executor data: <" + executorDataStr + ">");
                        TaskInfo task = TaskInfo.newBuilder()
                            .setName("worker " + slot.getNodeId() + ":" + slot.getPort())
                            .setTaskId(TaskID.newBuilder()
                                .setValue(MesosCommon.taskId(slot.getNodeId(), slot.getPort())))
                            .setSlaveId(offer.getSlaveId())
                            .setExecutor(ExecutorInfo.newBuilder()
                                .setExecutorId(ExecutorID.newBuilder().setValue(details.getId()))
                                .setData(ByteString.copyFromUtf8(executorDataStr))
                                .setCommand(CommandInfo.newBuilder()
                                    .addUris(URI.newBuilder().setValue((String) _conf.get(CONF_EXECUTOR_URI)))
                                    .setValue("cd storm-mesos* && python bin/storm-mesos supervisor")
                            ))
View Full Code Here

TOP

Related Classes of backtype.storm.scheduler.TopologyDetails

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.