class FsSavepointStore implements SavepointStore {

	@Override
	public Savepoint loadSavepoint(String path) throws IOException {
		Preconditions.checkNotNull(path, "Path");

		try (DataInputStream dis = new DataInputViewStreamWrapper(createFsInputStream(new Path(path)))) {
			int magicNumber = dis.readInt();

			if (magicNumber == MAGIC_NUMBER) {
				int version = dis.readInt();

				SavepointSerializer<?> serializer = SavepointSerializers.getSerializer(version);
				return serializer.deserialize(dis);
			} else {
				throw new RuntimeException("Unexpected magic number. This is most likely " +
						"caused by trying to load a Flink 1.0 savepoint. You cannot load a " +
						"savepoint triggered by Flink 1.0 with this version of Flink. If it is " +
						"_not_ a Flink 1.0 savepoint, this error indicates that the specified " +
						"file is not a proper savepoint or the file has been corrupted.");
			}
		}
	}

	  FsSavepointStore(String rootPath, String prefix);

}