Package org.apache.flink.runtime.history
Class FsJobArchivist
- java.lang.Object
-
- org.apache.flink.runtime.history.FsJobArchivist
-
public class FsJobArchivist extends Object
Utility class for writing an archive file to aFileSystemand reading it back.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.flink.core.fs.PatharchiveJob(org.apache.flink.core.fs.Path rootPath, org.apache.flink.api.common.JobID jobId, Collection<ArchivedJson> jsonToArchive)Writes the givenAccessExecutionGraphto theFileSystempointed to byJobManagerOptions.ARCHIVE_DIR.static Collection<ArchivedJson>getArchivedJsons(org.apache.flink.core.fs.Path file)Reads the given archive file and returns aCollectionof containedArchivedJson.
-
-
-
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 IOExceptionWrites the givenAccessExecutionGraphto theFileSystempointed to byJobManagerOptions.ARCHIVE_DIR.- Parameters:
rootPath- directory to which the archive should be written tojobId- job idjsonToArchive- 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 aCollectionof containedArchivedJson.- 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
-
-