Search in sources :

Example 6 with LaunchCmdlet

use of org.smartdata.protocol.message.LaunchCmdlet in project SSM by Intel-bigdata.

the class CmdletDispatcher method getNextCmdletToRun.

public LaunchCmdlet getNextCmdletToRun() throws IOException {
    Long cmdletId = pendingCmdlets.poll();
    if (cmdletId == null) {
        return null;
    }
    LaunchCmdlet launchCmdlet = idToLaunchCmdlet.get(cmdletId);
    runningCmdlets.add(cmdletId);
    return launchCmdlet;
}
Also used : LaunchCmdlet(org.smartdata.protocol.message.LaunchCmdlet)

Aggregations

LaunchCmdlet (org.smartdata.protocol.message.LaunchCmdlet)6 ArrayList (java.util.ArrayList)2 AtomicLong (java.util.concurrent.atomic.AtomicLong)2 ActionInfo (org.smartdata.model.ActionInfo)2 LaunchAction (org.smartdata.model.LaunchAction)2 SmartAction (org.smartdata.action.SmartAction)1 CmdletInfo (org.smartdata.model.CmdletInfo)1 ExecutorType (org.smartdata.model.ExecutorType)1 ScheduleResult (org.smartdata.model.action.ScheduleResult)1 CmdletStatus (org.smartdata.protocol.message.CmdletStatus)1 ActiveServerNodeCmdletMetrics (org.smartdata.server.cluster.ActiveServerNodeCmdletMetrics)1 NodeCmdletMetrics (org.smartdata.server.cluster.NodeCmdletMetrics)1