Package org.nimbustools.api.services.rm

Examples of org.nimbustools.api.services.rm.SchedulingException


            throws SchedulingException,
                   ResourceRequestDeniedException {

        if (!this.valid) {
            throw new SchedulingException("scheduler was instantiated " +
                    "incorrectly"); // note for future IoC muckers
        }

        if (coschedid != null && !this.slotManager.canCoSchedule()) {
            throw new ResourceRequestDeniedException("this " +
                    "scheduler can not coschedule, ensemble usage is not " +
                    "supported");
        }

        final int[] ids;
        try {
            ids = this.db.getNextTasktIds(numNodes);
        } catch (WorkspaceDatabaseException e) {
            throw new SchedulingException(e.getMessage(), e);
        }
        final String[] assocs;
        if (this.slotManager.isNeededAssociationsSupported()) {
            assocs = neededAssociations;
        } else {
            assocs = null;
        }

        // see CreationPending class comment
        this.creationPending.pending(ids);

        final NodeRequest req =
                new NodeRequest(ids, memory, cores, duration, assocs, resourcePool, groupid, creatorDN);

        try {

            if (coschedid == null) {
                return this.scheduleImpl(req, preemptable);
            } else {
                this.scheduleCoschedImpl(req, coschedid);
                return new Reservation(ids, null);
            }
           
        } catch (WorkspaceDatabaseException e) {
            this.creationPending.notpending(ids);
            throw new SchedulingException(e.getMessage(), e);
        } catch (ResourceRequestDeniedException e) {
            this.creationPending.notpending(ids);
            throw e;
        } catch (Throwable t) {
            this.creationPending.notpending(ids);
            throw new SchedulingException(t.getMessage(), t);
        }
    }
View Full Code Here


            throws SchedulingException,
                   ResourceRequestDeniedException {

        if (!this.valid) {
            throw new SchedulingException("scheduler was instantiated " +
                    "incorrectly"); // note for future IoC muckers
        }

        final Lock lock = lockManager.getLock(coschedid);

        try {
            lock.lockInterruptibly();
        } catch (InterruptedException e) {
            throw new SchedulingException(
                        new LockAcquisitionFailure(e));
        }

        try {
            this.proceedCoscheduleImpl(coschedid);
        } catch (WorkspaceDatabaseException e) {
            throw new SchedulingException(e.getMessage(), e);
        } finally {
            lock.unlock();
        }
    }
View Full Code Here

        if (sched == null) {
            return; // *** EARLY RETURN ***
        }

        if (sched.getDurationSeconds() < 0) {
            throw new SchedulingException(
                    "requested duration may not be less than zero");
        }
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.api.services.rm.SchedulingException

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.