edu.rit.pj.cluster
Class FrontendFileWriter
- java.lang.Object
-
- edu.rit.pj.cluster.FrontendFileWriter
-
public class FrontendFileWriter extends java.lang.ObjectClass FrontendFileWriter provides an object that writes sequential files in the job frontend process.
-
-
Constructor Summary
Constructors Constructor and Description FrontendFileWriter(JobFrontend theJobFrontend)Construct a new frontend file writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidoutputFileClose(JobBackendRef theJobBackend, int ffd)Close the given output file.voidoutputFileFlush(JobBackendRef theJobBackend, int ffd)Flush accumulated bytes to the given output file.voidoutputFileOpen(JobBackendRef theJobBackend, int bfd, java.io.File file, boolean append)Open the given output file for writing or appending.voidoutputFileWrite(JobBackendRef theJobBackend, int ffd, int len)Write the given bytes to the given output file.
-
-
-
Constructor Detail
-
FrontendFileWriter
public FrontendFileWriter(JobFrontend theJobFrontend)
Construct a new frontend file writer.- Parameters:
theJobFrontend- Job Frontend.
-
-
Method Detail
-
outputFileOpen
public void outputFileOpen(JobBackendRef theJobBackend, int bfd, java.io.File file, boolean append) throws java.io.IOException
Open the given output file for writing or appending.- Parameters:
theJobBackend- Job Backend that is calling this method.bfd- Backend file descriptor.file- File.append- True to append, false to overwrite.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
outputFileWrite
public void outputFileWrite(JobBackendRef theJobBackend, int ffd, int len) throws java.io.IOException
Write the given bytes to the given output file. ffd = 1 refers to the job's standard output stream; ffd = 2 refers to the job's standard error 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 write.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
outputFileFlush
public void outputFileFlush(JobBackendRef theJobBackend, int ffd) throws java.io.IOException
Flush accumulated bytes to the given output 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.
-
outputFileClose
public void outputFileClose(JobBackendRef theJobBackend, int ffd) throws java.io.IOException
Close the given output 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