edu.rit.pj.cluster
Class FrontendFileReader
- java.lang.Object
-
- edu.rit.pj.cluster.FrontendFileReader
-
public class FrontendFileReader extends java.lang.ObjectClass FrontendFileReader provides an object that reads sequential files in the job frontend process.
-
-
Constructor Summary
Constructors Constructor and Description FrontendFileReader(JobFrontend theJobFrontend)Construct a new frontend file reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidinputFileClose(JobBackendRef theJobBackend, int ffd)Close the given input file.voidinputFileOpen(JobBackendRef theJobBackend, int bfd, java.io.File file)Open the given input file for reading.voidinputFileRead(JobBackendRef theJobBackend, int ffd, int len)Read bytes from the given input file.voidinputFileSkip(JobBackendRef theJobBackend, int ffd, long len)Skip bytes from the given input file.
-
-
-
Constructor Detail
-
FrontendFileReader
public FrontendFileReader(JobFrontend theJobFrontend)
Construct a new frontend file reader.- Parameters:
theJobFrontend- Job Frontend.
-
-
Method Detail
-
inputFileOpen
public void inputFileOpen(JobBackendRef theJobBackend, int bfd, java.io.File file) throws java.io.IOException
Open the given input file for reading.- Parameters:
theJobBackend- Job Backend that is calling this method.bfd- Backend file descriptor.file- File.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileRead
public void inputFileRead(JobBackendRef theJobBackend, int ffd, int len) throws java.io.IOException
Read bytes from the given input file. ffd = 1 refers to the job's standard input stream; other values refer to a previously opened file.- Parameters:
theJobBackend- Job Backend that is calling this method.ffd- Frontend file descriptor.len- Number of bytes to read.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileSkip
public void inputFileSkip(JobBackendRef theJobBackend, int ffd, long len) throws java.io.IOException
Skip bytes from the given input file.- Parameters:
theJobBackend- Job Backend that is calling this method.ffd- Frontend file descriptor.len- Number of bytes to skip.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
inputFileClose
public void inputFileClose(JobBackendRef theJobBackend, int ffd) throws java.io.IOException
Close the given input file.- Parameters:
theJobBackend- Job Backend that is calling this method.ffd- Frontend file descriptor.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
-
DMelt 3.0 © DataMelt by jWork.ORG