final GridNodeInfo localNode = GridUtils.getLocalNode(config);
if(!excludeNodeList.contains(localNode)) {
excludeNodeList.add(localNode);
}
final GridNodeSelector nodeSelector = config.getNodeSelector();
final LockManager lockManager = directory.getLockManager();
final Map<GridNode, List<String>> assignMap = new HashMap<GridNode, List<String>>(relativePaths.size());
final List<Pair<String, Lock>> localExecResources = new ArrayList<Pair<String, Lock>>(relativePaths.size());
int totalLocked = 0;
for(String path : relativePaths) {
ReadWriteLock lock = lockManager.obtainLock(path);
final Lock rlock = lock.readLock();
if(rlock.tryLock()) {
localExecResources.add(new Pair<String, Lock>(path, rlock));
} else {
totalLocked++;