Package org.apache.hadoop.mapred.JobQueueJobInProgressListener

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


  }

  // Update the scheduler as job's state has changed
  private void jobStateChanged(JobStatusChangeEvent event) {
    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() == JobStatusChangeEvent.EventType.PRIORITY_CHANGED
      || event.getEventType() ==
      JobStatusChangeEvent.EventType.START_TIME_CHANGED) {
View Full Code Here


    UserInfo userInfo = users.get(user);
    return (userInfo == null) ? 0 : userInfo.getNumWaitingJobs();
  }

  synchronized void addInitializingJob(JobInProgress job) {
    JobSchedulingInfo jobSchedInfo = new JobSchedulingInfo(job);

    if (!waitingJobs.containsKey(jobSchedInfo)) {
      // Ideally this should have been an *assert*, but it can't be done
      // since we make copies in getWaitingJobs which is used in
      // JobInitPoller.getJobsToInitialize
View Full Code Here

   
    return job;
  }
 
  synchronized void addRunningJob(JobInProgress job) {
    JobSchedulingInfo jobSchedInfo = new JobSchedulingInfo(job);

    if (runningJobs.containsKey(jobSchedInfo)) {
      LOG.info("job " + job.getJobID() + " already running in queue'" +
          queueName + "'!");
      return;
View Full Code Here

    return job;
  }
 
  synchronized void addWaitingJob(JobInProgress job) throws IOException {
    JobSchedulingInfo jobSchedInfo = new JobSchedulingInfo(job);
    if (waitingJobs.containsKey(jobSchedInfo)) {
      LOG.info("job " + job.getJobID() + " already waiting in queue '" +
          queueName + "'!");
      return;
    }
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

  }
 
  // 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

  }
 
  void removeJobFromWaitingQueue(JobInProgress job) {
    String queue = job.getProfile().getQueueName();
    QueueInfo qi = jobQueues.get(queue);
    qi.removeWaitingJob(new JobSchedulingInfo(job));
  }
View Full Code Here

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

      }
    }
   
    void addWaitingJob(JobInProgress job) {
      synchronized (waitingJobs) {
        waitingJobs.put(new JobSchedulingInfo(job), job);
      }
    }
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

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.