public abstract class ClusterStateStore extends Object
| Constructor and Description |
|---|
ClusterStateStore() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
destroy()
Destroys the provided cluster's state in storage.
|
abstract Cluster |
load()
Deserializes cluster state from storage.
|
abstract void |
save(Cluster cluster)
Saves cluster state to storage.
|
protected String |
serialize(Cluster cluster)
Create parser friendly string representation for a
Cluster |
Cluster |
tryLoadOrEmpty()
Try to load the cluster state or return an empty instance
|
protected Cluster |
unserialize(ClusterSpec spec,
String content)
Rebuild the
Cluster instance by using the string representation |
public abstract Cluster load() throws IOException
IOExceptionpublic Cluster tryLoadOrEmpty()
public abstract void save(Cluster cluster) throws IOException
cluster - IOExceptionpublic abstract void destroy()
throws IOException
IOExceptionprotected String serialize(Cluster cluster) throws IOException
Clustercluster - IOExceptionprotected Cluster unserialize(ClusterSpec spec, String content) throws UnknownHostException
Cluster instance by using the string representationspec - content - UnknownHostExceptionCopyright © 2010–2016 Cloudera. All rights reserved.