Package org.apache.hadoop.mapred.JobQueueJobInProgressListener

Examples of org.apache.hadoop.mapred.JobQueueJobInProgressListener.JobSchedulingInfo


      if (jobs == null) {
        LOG.error("Invalid queue passed to the thread : " + queue
            + " For job :: " + job.getJobID());
      }
      synchronized (jobs) {
        JobSchedulingInfo schedInfo = new JobSchedulingInfo(job);
        jobs.put(schedInfo, job);
        currentJobCount.getAndIncrement();
      }
    }
View Full Code Here


          ". Ignoring job.");
      return;
    }
    // add job to waiting queue. It will end up in the right place,
    // based on priority.
    qi.waitingJobs.put(new JobSchedulingInfo(job), job);
    // let scheduler know.
    scheduler.jobAdded(job);
  }
View Full Code Here

  // This is used to reposition a job in the queue. A job can get repositioned
  // because of the change in the job priority or job start-time.
  private void reorderJobs(JobInProgress job, JobSchedulingInfo oldInfo,
                           QueueInfo qi) {
   
    JobSchedulingInfo newInfo = new JobSchedulingInfo(job);
    if (qi.waitingJobs.remove(oldInfo) == null) {
      qi.runningJobs.remove(oldInfo);
      // Add back to the running queue
      qi.runningJobs.put(newInfo, job);
    } else {
View Full Code Here

                              QueueInfo qi) {
    // Remove from the waiting queue
    qi.waitingJobs.remove(oldInfo);
   
    // Add the job to the running queue
    qi.runningJobs.put(new JobSchedulingInfo(job), job);
  }
View Full Code Here

  }
 
  // Update the scheduler as job's state has changed
  private void jobStateChanged(JobStatusChangeEvent event, QueueInfo qi) {
    JobInProgress job = event.getJobInProgress();
    JobSchedulingInfo oldJobStateInfo =
      new JobSchedulingInfo(event.getOldStatus());
    // Check if the ordering of the job has changed
    // For now priority and start-time can change the job ordering
    if (event.getEventType() == EventType.PRIORITY_CHANGED
        || event.getEventType() == EventType.START_TIME_CHANGED) {
      // Make a priority change
View Full Code Here

      if (jobs == null) {
        LOG.error("Invalid queue passed to the thread : " + queue
            + " For job :: " + job.getJobID());
      }
      synchronized (jobs) {
        JobSchedulingInfo schedInfo = new JobSchedulingInfo(job);
        jobs.put(schedInfo, job);
        currentJobCount.getAndIncrement();
      }
    }
View Full Code Here

      if (job.getStatus().getRunState() == JobStatus.RUNNING) {
        if (isScheduled(job)) {
          LOG.info("Removing scheduled jobs from waiting queue"
              + job.getJobID());
          jobsIterator.remove();
          jobQueueManager.getJobQueue(job).removeWaitingJob(new JobSchedulingInfo(job));
          continue;
        }
      }
      if(job.isComplete()) {
        LOG.info("Removing killed/completed job from initalized jobs " +
View Full Code Here

        LOG.error("Invalid queue passed to the thread : " + queue
            + " For job :: " + job.getJobID());
        return;
      }
      synchronized (jobs) {
        JobSchedulingInfo schedInfo = new JobSchedulingInfo(job);
        jobs.put(schedInfo, job);
        currentJobCount.getAndIncrement();
      }
    }
View Full Code Here

  }

  private void addRunningJob(JobInProgress job) {
    synchronized (runningJobs) {
      runningJobs.put(
        new JobSchedulingInfo(
          job), job);
    }
  }
View Full Code Here

  }

  private void addWaitingJob(JobInProgress job) {
    synchronized (waitingJobs) {
      waitingJobs.put(
        new JobSchedulingInfo(
          job), job);
      this.qsc.setNumOfWaitingJobs(waitingJobs.size());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.JobQueueJobInProgressListener.JobSchedulingInfo

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.