edu.rit.pj.cluster
Interface JobBackendRef
-
- All Known Implementing Classes:
- JobBackend, JobBackendProxy
public interface JobBackendRefInterface JobBackendRef specifies the interface for the PJ job backend process.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidcancelJob(JobFrontendRef theJobFrontend, java.lang.String errmsg)Cancel the job.voidclose()Close communication with this Job Backend.voidcommenceJob(JobFrontendRef theJobFrontend, java.net.InetSocketAddress[] middlewareAddress, java.net.InetSocketAddress[] worldAddress, java.net.InetSocketAddress[] frontendAddress, java.util.Properties properties, java.lang.String mainClassName, java.lang.String[] args)Commence the job.voidinputFileCloseResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc)Report the result of closing the given input file.voidinputFileOpenResult(JobFrontendRef theJobFrontend, int bfd, int ffd, java.io.IOException exc)Report the result of opening the given input file.voidinputFileReadResult(JobFrontendRef theJobFrontend, int ffd, byte[] buf, int len, java.io.IOException exc)Report the result of reading the given input file.voidinputFileSkipResult(JobFrontendRef theJobFrontend, int ffd, long len, java.io.IOException exc)Report the result of skipping the given input file.voidjobFinished(JobFrontendRef theJobFrontend)Report that the job finished.voidoutputFileCloseResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc)Report the result of closing the given output file.voidoutputFileFlushResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc)Report the result of flushing the given output file.voidoutputFileOpenResult(JobFrontendRef theJobFrontend, int bfd, int ffd, java.io.IOException exc)Report the result of opening the given output file.voidoutputFileWriteResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc)Report the result of writing the given output file.voidrenewLease(JobFrontendRef theJobFrontend)Renew the lease on the job.voidreportResource(JobFrontendRef theJobFrontend, java.lang.String resourceName, byte[] content)Report the content for a previously-requested resource.voidreportResource(JobFrontendRef theJobFrontend, java.lang.String resourceName, ByteSequence content)Report the content for a previously-requested resource.
-
-
-
Method Detail
-
cancelJob
void cancelJob(JobFrontendRef theJobFrontend, java.lang.String errmsg) throws java.io.IOException
Cancel the job.- Parameters:
theJobFrontend- Job Frontend that is calling this method.errmsg- Error message string.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
commenceJob
void commenceJob(JobFrontendRef theJobFrontend, java.net.InetSocketAddress[] middlewareAddress, java.net.InetSocketAddress[] worldAddress, java.net.InetSocketAddress[] frontendAddress, java.util.Properties properties, java.lang.String mainClassName, java.lang.String[] args) throws java.io.IOException
Commence the job.- Parameters:
theJobFrontend- Job Frontend that is calling this method.middlewareAddress- Array of hosts/ports for middleware messages. The first K elements are for the job backend processes in rank order, the K+1st element is for the job frontend process. If theworldAddress- Array of hosts/ports for the world communicator. The K elements are for the job backend processes in rank order.frontendAddress- Array of hosts/ports for the frontend communicator. The first K elements are for the job backend processes in rank order, the K+1st element is for the job frontend process. If the frontend communicator does not exist, frontendAddress is null.properties- Java system properties.mainClassName- Fully qualified class name of the Java main program class to execute.args- Array of 0 or more Java command line arguments.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
jobFinished
void jobFinished(JobFrontendRef theJobFrontend) throws java.io.IOException
Report that the job finished.- Parameters:
theJobFrontend- Job frontend that is calling this method.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
renewLease
void renewLease(JobFrontendRef theJobFrontend) throws java.io.IOException
Renew the lease on the job.- Parameters:
theJobFrontend- Job Frontend that is calling this method.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
reportResource
void reportResource(JobFrontendRef theJobFrontend, java.lang.String resourceName, byte[] content) throws java.io.IOException
Report the content for a previously-requested resource.- Parameters:
theJobFrontend- Job Frontend that is calling this method.resourceName- Resource name.content- Resource content, or null if resource not found.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
reportResource
void reportResource(JobFrontendRef theJobFrontend, java.lang.String resourceName, ByteSequence content) throws java.io.IOException
Report the content for a previously-requested resource.- Parameters:
theJobFrontend- Job Frontend that is calling this method.resourceName- Resource name.content- Resource content, or null if resource not found.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
outputFileOpenResult
void outputFileOpenResult(JobFrontendRef theJobFrontend, int bfd, int ffd, java.io.IOException exc) throws java.io.IOException
Report the result of opening the given output file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.bfd- Backend file descriptor.ffd- Frontend file descriptor if success.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
outputFileWriteResult
void outputFileWriteResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc) throws java.io.IOException
Report the result of writing the given output file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.ffd- Frontend file descriptor.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
outputFileFlushResult
void outputFileFlushResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc) throws java.io.IOException
Report the result of flushing the given output file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.ffd- Frontend file descriptor.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
outputFileCloseResult
void outputFileCloseResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc) throws java.io.IOException
Report the result of closing the given output file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.ffd- Frontend file descriptor.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileOpenResult
void inputFileOpenResult(JobFrontendRef theJobFrontend, int bfd, int ffd, java.io.IOException exc) throws java.io.IOException
Report the result of opening the given input file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.bfd- Backend file descriptor.ffd- Frontend file descriptor if success.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileReadResult
void inputFileReadResult(JobFrontendRef theJobFrontend, int ffd, byte[] buf, int len, java.io.IOException exc) throws java.io.IOException
Report the result of reading the given input file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.ffd- Frontend file descriptor.buf- Bytes read.len- Number of bytes read, or -1 if EOF.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileSkipResult
void inputFileSkipResult(JobFrontendRef theJobFrontend, int ffd, long len, java.io.IOException exc) throws java.io.IOException
Report the result of skipping the given input file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.ffd- Frontend file descriptor.len- Number of bytes skipped.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileCloseResult
void inputFileCloseResult(JobFrontendRef theJobFrontend, int ffd, java.io.IOException exc) throws java.io.IOException
Report the result of closing the given input file.- Parameters:
theJobFrontend- Job Frontend that is calling this method.ffd- Frontend file descriptor.exc- Null if success, exception if failure.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
close
void close()
Close communication with this Job Backend.
-
-
DMelt 3.0 © DataMelt by jWork.ORG