Examples of JobSchedulingInfo


Examples of com.sun.grid.jgdi.configuration.JobSchedulingInfo

       
        JGDI jgdi = createJGDI();
        try {
            PrintWriter pw = new PrintWriter(System.out);
            pw.println("Global Message List");
            JobSchedulingInfo schedInfo = jgdi.getJobSchedulingInfo();
            for (JobSchedulingMessage mes : schedInfo.getGlobalMessageList()) {
                pw.println(mes.getMessage() + " (" + mes.getMessageNumber() + ")");
                for (int i = 0; i < mes.getJobNumberCount(); i++) {
                    pw.println("Job " + mes.getJobNumberList().get(i).toString());
                }
            }
            if (schedInfo.isSetMessage()) {
                pw.println("Message List");
                for (JobSchedulingMessage mes : schedInfo.getMessageList()) {
                    pw.println(mes.getMessage() + " (" + mes.getMessageNumber() + ")");
                    for (int i = 0; i < mes.getJobNumberCount(); i++) {
                        int jobId = ((ULNG) mes.getJobNumberList().get(i)).getValue();
                        pw.println("job_number: " + jobId);
                        Job job = jgdi.getJob(jobId);
View Full Code Here

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

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

          ". 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

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

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

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

                              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

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

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

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

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

      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

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

        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

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

  }

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