/** * Change the run-time priority of the given job. * @param jobId job id * @param priority new {@link JobPriority} for the job */ synchronized void setJobPriority(JobID jobId, JobPriority priority) { JobInProgress job = jobs.get(jobId); if (job != null) { synchronized (taskScheduler) { JobStatus oldStatus = (JobStatus)job.getStatus().clone(); job.setPriority(priority); JobStatus newStatus = (JobStatus)job.getStatus().clone(); JobStatusChangeEvent event = new JobStatusChangeEvent(job, EventType.PRIORITY_CHANGED, oldStatus, newStatus); updateJobInProgressListeners(event); } } else { LOG.warn("Trying to change the priority of an unknown job: " + jobId); } }
/** * Change the run-time priority of the given job. * @param jobId job id * @param priority new {@link JobPriority} for the job */ synchronized void setJobPriority(JobID jobId, JobPriority priority) { JobInProgress job = jobs.get(jobId); if (job != null) { synchronized (taskScheduler) { JobStatus oldStatus = (JobStatus)job.getStatus().clone(); job.setPriority(priority); JobStatus newStatus = (JobStatus)job.getStatus().clone(); JobStatusChangeEvent event = new JobStatusChangeEvent(job, EventType.PRIORITY_CHANGED, oldStatus, newStatus); updateJobInProgressListeners(event); } } else { LOG.warn("Trying to change the priority of an unknown job: " + jobId); } }
/** * Change the run-time priority of the given job. * * @param jobId job id * @param priority new {@link JobPriority} for the job * @throws IOException * @throws AccessControlException */ synchronized void setJobPriority(JobID jobId, JobPriority priority) throws AccessControlException, IOException { JobInProgress job = jobs.get(jobId); if (job != null) { // check both queue-level and job-level access aclsManager.checkAccess(job, UserGroupInformation.getCurrentUser(), Operation.SET_JOB_PRIORITY); synchronized (taskScheduler) { JobStatus oldStatus = (JobStatus)job.getStatus().clone(); job.setPriority(priority); JobStatus newStatus = (JobStatus)job.getStatus().clone(); JobStatusChangeEvent event = new JobStatusChangeEvent(job, EventType.PRIORITY_CHANGED, oldStatus, newStatus); updateJobInProgressListeners(event); } } else { LOG.warn("Trying to change the priority of an unknown job: " + jobId); } }
this.startTime, hasRestarted()); setPriority(this.priority);
setPriority(this.priority);
this.startTime); setPriority(this.priority);