Class FsCheckpointStreamFactory.FsCheckpointStateOutputStream

    • Constructor Detail

      • FsCheckpointStateOutputStream

        public FsCheckpointStateOutputStream​(org.apache.flink.core.fs.Path basePath,
                                             org.apache.flink.core.fs.FileSystem fs,
                                             int bufferSize,
                                             int localStateThreshold)
      • FsCheckpointStateOutputStream

        public FsCheckpointStateOutputStream​(org.apache.flink.core.fs.Path basePath,
                                             org.apache.flink.core.fs.FileSystem fs,
                                             int bufferSize,
                                             int localStateThreshold,
                                             boolean allowRelativePaths)
    • Method Detail

      • getPos

        public long getPos()
                    throws IOException
        Specified by:
        getPos in class org.apache.flink.core.fs.FSDataOutputStream
        Throws:
        IOException
      • flush

        public void flush()
                   throws IOException
        Flush buffers to file if their size is above localStateThreshold.
        Specified by:
        flush in interface Flushable
        Specified by:
        flush in class org.apache.flink.core.fs.FSDataOutputStream
        Throws:
        IOException
      • sync

        public void sync()
                  throws IOException
        Specified by:
        sync in class org.apache.flink.core.fs.FSDataOutputStream
        Throws:
        IOException
      • isClosed

        public boolean isClosed()
        Checks whether the stream is closed.
        Returns:
        True if the stream was closed, false if it is still open.
      • close

        public void close()
        If the stream is only closed, we remove the produced file (cleanup through the auto close feature, for example). This method throws no exception if the deletion fails, but only logs the error.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in class CheckpointStateOutputStream