Class JobScheduler

java.lang.Object
edu.rit.pj.cluster.JobScheduler
All Implemented Interfaces:
JobSchedulerRef

public class JobScheduler extends Object implements JobSchedulerRef
Class JobScheduler is the main program for the PJ Job Scheduler Daemon process for a parallel computer.

Run the Job Scheduler Daemon on the cluster's frontend processor by typing this command:

java edu.rit.pj.cluster.JobScheduler configfile
configfile = Configuration file name

For further information about the configuration file, see class Configuration.

Version:
20-Jun-2012
Author:
Alan Kaminsky
  • Method Details

    • backendFailed

      public void backendFailed(JobFrontendRef theJobFrontend, String name) throws IOException
      Report that a backend node failed. Report that a backend node failed.
      Specified by:
      backendFailed in interface JobSchedulerRef
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      name - Backend node name.
      Throws:
      IOException - Thrown if an I/O error occurred.
    • cancelJob

      public void cancelJob(JobFrontendRef theJobFrontend, String errmsg) throws IOException
      Cancel a job. Cancel a job.
      Specified by:
      cancelJob in interface JobSchedulerRef
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      errmsg - Error message string.
      Throws:
      IOException - Thrown if an I/O error occurred.
    • jobFinished

      public void jobFinished(JobFrontendRef theJobFrontend) throws IOException
      Report that a job finished. Report that a job finished.
      Specified by:
      jobFinished in interface JobSchedulerRef
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      Throws:
      IOException - Thrown if an I/O error occurred.
    • renewLease

      public void renewLease(JobFrontendRef theJobFrontend) throws IOException
      Renew the lease on a job. Renew the lease on a job.
      Specified by:
      renewLease in interface JobSchedulerRef
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      Throws:
      IOException - Thrown if an I/O error occurred.
    • reportComment

      public void reportComment(JobFrontendRef theJobFrontend, int rank, String comment)
      Report a comment for a process. Report a comment for a process.
      Specified by:
      reportComment in interface JobSchedulerRef
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      rank - Process rank.
      comment - Comment string.
    • requestJob

      public void requestJob(JobFrontendRef theJobFrontend, String username, int Nn, int Np, int Nt) throws IOException
      Request that a job be scheduled. Request that a job be scheduled.
      Specified by:
      requestJob in interface JobSchedulerRef
      Parameters:
      theJobFrontend - Job frontend that is calling this method.
      username - User name.
      Nn - Number of backend nodes.
      Np - Number of processes.
      Nt - Number of CPUs per process. 0 means "all CPUs."
      Throws:
      IOException - Thrown if an I/O error occurred.
    • close

      public void close()
      Close communication with this Job Scheduler.
      Specified by:
      close in interface JobSchedulerRef
    • main

      public static void main(String[] args) throws Exception
      Job Scheduler main program.
      Parameters:
      args - an array of String objects.
      Throws:
      Exception - if any.