/** * Deserialize/read a {@link State} instance from a file. * * @param fs the {@link FileSystem} instance for opening the file * @param jobStateFilePath the path to the file * @param state an empty {@link State} instance to deserialize into * @param <T> the {@link State} object type * @throws IOException if it fails to deserialize the {@link State} instance */ public static <T extends State> void deserializeState(FileSystem fs, Path jobStateFilePath, T state) throws IOException { try (InputStream is = fs.open(jobStateFilePath)) { deserializeStateFromInputStream(is, state); } }
if (dcPath.getName().equals(jobStateFileName)) { SerializationUtils .deserializeStateFromInputStream(closer.register(new FileInputStream(dcPath.toUri().getPath())), this.jobState); foundStateFile = true;