Package edu.rit.pj.cluster
Class JobSchedulerProxy
java.lang.Object
edu.rit.pj.cluster.Proxy
edu.rit.pj.cluster.JobSchedulerProxy
- All Implemented Interfaces:
JobSchedulerRef
Class JobSchedulerProxy provides a proxy object for sending messages to a PJ
job scheduler process.
- Version:
- 24-Jan-2012
- Author:
- Alan Kaminsky
-
Constructor Summary
ConstructorDescriptionJobSchedulerProxy
(ChannelGroup theChannelGroup, Channel theChannel) Construct a new job scheduler proxy. -
Method Summary
Modifier and TypeMethodDescriptionvoid
backendFailed
(JobFrontendRef theJobFrontend, String name) Report that a backend node failed.void
cancelJob
(JobFrontendRef theJobFrontend, String errmsg) Cancel a job.void
jobFinished
(JobFrontendRef theJobFrontend) Report that a job finished.void
renewLease
(JobFrontendRef theJobFrontend) Renew the lease on a job.void
reportComment
(JobFrontendRef theJobFrontend, int rank, String comment) Report a comment for a process.void
requestJob
(JobFrontendRef theJobFrontend, String username, int Nn, int Np, int Nt) Request that a job be scheduled.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.rit.pj.cluster.JobSchedulerRef
close
-
Constructor Details
-
JobSchedulerProxy
Construct a new job scheduler proxy. The proxy will use the given channel in the given channel group to send messages to the job scheduler process.- Parameters:
theChannelGroup
- Channel group.theChannel
- Channel.
-
-
Method Details
-
backendFailed
Report that a backend node failed. Report that a backend node failed.- Specified by:
backendFailed
in interfaceJobSchedulerRef
- Parameters:
theJobFrontend
- Job frontend that is calling this method.name
- Backend node name.- Throws:
IOException
- Thrown if an I/O error occurred.
-
cancelJob
Cancel a job. Cancel a job.- Specified by:
cancelJob
in interfaceJobSchedulerRef
- Parameters:
theJobFrontend
- Job frontend that is calling this method.errmsg
- Error message string.- Throws:
IOException
- Thrown if an I/O error occurred.
-
jobFinished
Report that a job finished. Report that a job finished.- Specified by:
jobFinished
in interfaceJobSchedulerRef
- Parameters:
theJobFrontend
- Job frontend that is calling this method.- Throws:
IOException
- Thrown if an I/O error occurred.
-
renewLease
Renew the lease on a job. Renew the lease on a job.- Specified by:
renewLease
in interfaceJobSchedulerRef
- 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) throws IOException Report a comment for a process. Report a comment for a process.- Specified by:
reportComment
in interfaceJobSchedulerRef
- Parameters:
theJobFrontend
- Job frontend that is calling this method.rank
- Process rank.comment
- Comment string.- Throws:
IOException
- Thrown if an I/O error occurred.
-
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 interfaceJobSchedulerRef
- 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.
-