public class FsSavepointStore extends Object implements SavepointStore
SavepointStore
.
Stored savepoints have the following format:
MagicNumber SavepointVersion Savepoint - MagicNumber => int - SavepointVersion => int (returned by Savepoint#getVersion()) - Savepoint => bytes (serialized via version-specific SavepointSerializer)
Modifier and Type | Method and Description |
---|---|
void |
disposeSavepoint(String path,
ClassLoader classLoader)
Disposes the savepoint at the specified path.
|
Savepoint |
loadSavepoint(String path)
Loads the savepoint at the specified path.
|
void |
shutdown()
Shut downs the savepoint store.
|
<T extends Savepoint> |
storeSavepoint(T savepoint)
Stores the savepoint.
|
public <T extends Savepoint> String storeSavepoint(T savepoint) throws IOException
SavepointStore
storeSavepoint
in interface SavepointStore
T
- Savepoint typesavepoint
- Savepoint to be storedIOException
public Savepoint loadSavepoint(String path) throws IOException
SavepointStore
loadSavepoint
in interface SavepointStore
path
- Path of savepoint to loadIOException
public void disposeSavepoint(String path, ClassLoader classLoader) throws Exception
SavepointStore
The class loader is needed, because savepoints can currently point to
arbitrary snapshot StateHandle
instances, which need the user code class loader for deserialization.
disposeSavepoint
in interface SavepointStore
path
- Path of savepoint to disposeclassLoader
- Class loader for disposalException
- Failures during diposal are forwardedpublic void shutdown() throws Exception
SavepointStore
Only necessary for implementations where the savepoint life-cycle is bound to the cluster life-cycle.
shutdown
in interface SavepointStore
Exception
- Failures during shut down are forwardedCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.