Examples of PermitLock


Examples of azkaban.jobcontrol.impl.jobs.locks.PermitLock

        // Group Lock List
        ArrayList<JobLock> jobLocks = new ArrayList<JobLock>();

        // If this job requires work permits wrap it in a resource throttler
        if(jobDescriptor.getNumRequiredPermits() > 0) {
            PermitLock permits = _permitManager.getNamedPermit("default",
                                                               jobDescriptor.getNumRequiredPermits());
            if(permits == null) {
                throw new RuntimeException("Job " + jobDescriptor.getId() + " requires non-existant default");
            } else if(permits.getDesiredNumPermits() > permits.getTotalNumberOfPermits()) {
                throw new RuntimeException(
                        String.format(
                                "Job %s requires %s but azkaban only has a total of %s permits, so this job cannot ever run.",
                                jobDescriptor.getId(),
                                permits.getTotalNumberOfPermits(),
                                permits.getDesiredNumPermits()
                        )
                );
            } else {
                jobLocks.add(permits);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.