Class FsJobArchivist


  • public class FsJobArchivist
    extends Object
    Utility class for writing an archive file to a FileSystem and reading it back.
    • Method Detail

      • archiveJob

        public static org.apache.flink.core.fs.Path archiveJob​(org.apache.flink.core.fs.Path rootPath,
                                                               org.apache.flink.api.common.JobID jobId,
                                                               Collection<ArchivedJson> jsonToArchive)
                                                        throws IOException
        Writes the given AccessExecutionGraph to the FileSystem pointed to by JobManagerOptions.ARCHIVE_DIR.
        Parameters:
        rootPath - directory to which the archive should be written to
        jobId - job id
        jsonToArchive - collection of json-path pairs to that should be archived
        Returns:
        path to where the archive was written, or null if no archive was created
        Throws:
        IOException
      • getArchivedJsons

        public static Collection<ArchivedJson> getArchivedJsons​(org.apache.flink.core.fs.Path file)
                                                         throws IOException
        Reads the given archive file and returns a Collection of contained ArchivedJson.
        Parameters:
        file - archive to extract
        Returns:
        collection of archived jsons
        Throws:
        IOException - if the file can't be opened, read or doesn't contain valid json