Class SubProcessIOFiles
- java.lang.Object
-
- org.apache.beam.examples.subprocess.kernel.SubProcessIOFiles
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class SubProcessIOFiles extends java.lang.Object implements java.io.CloseableAll information generated from the process will be stored in output files. The local working directory is used to generate three files with extension .err for standard error output .out for standard out output .ret for storing the results from the called library. The files will have a uuid created for them based on java.util.UUID
-
-
Constructor Summary
Constructors Constructor Description SubProcessIOFiles(java.lang.String workerWorkingDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Clean up the files that have been created on the local worker file system.voidcopyOutPutFilesToBucket(SubProcessConfiguration configuration, java.lang.String params)Will copy the output files to the GCS path setup via the configuration.java.nio.file.PathgetErrFile()java.lang.StringgetErrFileLocation()java.nio.file.PathgetOutFile()java.lang.StringgetOutFileLocation()java.nio.file.PathgetResultFile()
-
-
-
Method Detail
-
getErrFileLocation
public java.lang.String getErrFileLocation()
-
getOutFileLocation
public java.lang.String getOutFileLocation()
-
getErrFile
public java.nio.file.Path getErrFile()
-
getOutFile
public java.nio.file.Path getOutFile()
-
getResultFile
public java.nio.file.Path getResultFile()
-
close
public void close() throws java.io.IOExceptionClean up the files that have been created on the local worker file system. Without this expect both performance issues and eventual failure- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
copyOutPutFilesToBucket
public void copyOutPutFilesToBucket(SubProcessConfiguration configuration, java.lang.String params)
Will copy the output files to the GCS path setup via the configuration.- Parameters:
configuration-params-
-
-