Class FileStateHandle

    • Constructor Detail

      • FileStateHandle

        public FileStateHandle​(org.apache.flink.core.fs.Path filePath,
                               long stateSize)
        Creates a new file state for the given file path.
        Parameters:
        filePath - The path to the file that stores the state.
    • Method Detail

      • getFilePath

        public org.apache.flink.core.fs.Path getFilePath()
        Gets the path where this handle's state is stored.
        Returns:
        The path where this handle's state is stored.
      • discardState

        public void discardState()
                          throws Exception
        Discard the state by deleting the file that stores the state. If the parent directory of the state is empty after deleting the state file, it is also deleted.
        Specified by:
        discardState in interface StateObject
        Throws:
        Exception - Thrown, if the file deletion (not the directory deletion) fails.
      • getStateSize

        public long getStateSize()
        Returns the file size in bytes.
        Specified by:
        getStateSize in interface StateObject
        Returns:
        The file size in bytes.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object