/** * Is there any possibility that exec could ever fit on this node. * @param exec the executor to schedule * @param td the topology the executor is a part of * @return true if there is the possibility it might fit, no guarantee that it will, or false if there is no * way it would ever fit. */ public boolean couldEverFit(ExecutorDetails exec, TopologyDetails td) { NormalizedResourceOffer avail = getTotalAvailableResources(); NormalizedResourceRequest requestedResources = td.getTotalResources(exec); return isAlive && avail.couldHoldIgnoringSharedMemory(requestedResources); }
if (!resourcesAvailable.couldHoldIgnoringSharedMemory(requestedResources)) { return false;