Changes between Version 10 and Version 11 of schedule


Ignore:
Timestamp:
10/18/2012 03:20:09 PM (14 years ago)
Author:
liaojiaohe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • schedule

    v10 v11  
    55设想方案[[BR]] 
    66 
    7 *研究Capacity Scheduler 参数[[BR]] 
     7* 研究Capacity Scheduler 参数[[BR]] 
    88 
    9 *如果Capacity Scheduler 不能慢速,修改代码让系统把job分配到不同的queue[[BR]] 
     9* 如果Capacity Scheduler 不能慢速,修改代码让系统把job分配到不同的queue[[BR]] 
    1010 
     11假设又两条queue:default,highPrior,当default被占满后,而highPrior比较空闲[[BR]] 
     12 优先级是HIGH的会被分配到highPrior队列[[BR]] 
     13 
     14修改JobQueueManager,jobAdded 函数 
     15 
     16 
     17{{{ 
     18  @Override 
     19  public void jobAdded(JobInProgress job) throws IOException { 
     20    LOG.info("Job " + job.getJobID() + " submitted to queue " +  
     21        job.getProfile().getQueueName()); 
     22     
     23    // add job to the right queue 
     24    CapacitySchedulerQueue queue = getQueue(job.getProfile().getQueueName()); 
     25    if (null == queue) { 
     26      // job was submitted to a queue we're not aware of 
     27      LOG.warn("Invalid queue " + job.getProfile().getQueueName() +  
     28          " specified for job" + job.getProfile().getJobID() +  
     29          ". Ignoring job."); 
     30      return; 
     31    } 
     32    // add job to waiting queue. It will end up in the right place,  
     33    // based on priority.  
     34    queue.addWaitingJob(job); 
     35    // let scheduler know.  
     36    scheduler.jobAdded(job); 
     37  } 
     38}}}