Search in sources :

Example 1 with ExecutorType

use of org.smartdata.model.ExecutorType in project SSM by Intel-bigdata.

the class CmdletDispatcher method onCmdletFinished.

public void onCmdletFinished(long cmdletId) {
    synchronized (dispatchedToSrvs) {
        if (dispatchedToSrvs.containsKey(cmdletId)) {
            LaunchCmdlet cmdlet = idToLaunchCmdlet.get(cmdletId);
            if (cmdlet == null) {
                return;
            }
            if (regNodes.get(cmdlet.getNodeId()) != null) {
                regNodes.get(cmdlet.getNodeId()).incrementAndGet();
            }
            NodeCmdletMetrics metrics = regNodeInfos.get(cmdlet.getNodeId());
            if (metrics != null) {
                metrics.finishCmdlet();
            }
            ExecutorType t = dispatchedToSrvs.remove(cmdletId);
            updateSlotsLeft(t.ordinal(), 1);
            completeOn[t.ordinal()] = cmdlet.getNodeId();
        }
    }
}
Also used : ActiveServerNodeCmdletMetrics(org.smartdata.server.cluster.ActiveServerNodeCmdletMetrics) NodeCmdletMetrics(org.smartdata.server.cluster.NodeCmdletMetrics) ExecutorType(org.smartdata.model.ExecutorType) LaunchCmdlet(org.smartdata.protocol.message.LaunchCmdlet)

Aggregations

ExecutorType (org.smartdata.model.ExecutorType)1 LaunchCmdlet (org.smartdata.protocol.message.LaunchCmdlet)1 ActiveServerNodeCmdletMetrics (org.smartdata.server.cluster.ActiveServerNodeCmdletMetrics)1 NodeCmdletMetrics (org.smartdata.server.cluster.NodeCmdletMetrics)1