Class RefCountedTmpFileCreator

    • Method Detail

      • apply

        public RefCountedFileWithStream apply​(File file)
                                       throws IOException
        Gets the next temp file and stream to temp file. This creates the temp file atomically, making sure no previous file is overwritten.

        This method is safe against concurrent use.

        Specified by:
        apply in interface org.apache.flink.util.function.FunctionWithException<File,​RefCountedFileWithStream,​IOException>
        Returns:
        A pair of temp file and output stream to that temp file.
        Throws:
        IOException - Thrown, if the stream to the temp file could not be opened.