public class YarnClusterManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the manager, removes shutdown hook and
closes all running clusters.
|
boolean |
closeCluster(YarnCluster cluster)
Closes and remove
YarnCluster from
a manager cache. |
protected void |
doClose()
Bring down and un-register all the running clusters.
|
YarnCluster |
getCluster(ClusterInfo clusterInfo)
Gets and starts the mini cluster.
|
static YarnClusterManager |
getInstance()
Gets the singleton instance of
YarnClusterManager . |
static YarnClusterManager |
getInstance(boolean registerShutdownHook)
Gets the singleton instance of
YarnClusterManager . |
void |
registerShutdownHook()
Register a jvm shutdown hook allowing manager
to gracefully shutdown clusters in case that
hasn't already happened.
|
public static YarnClusterManager getInstance()
YarnClusterManager
.public static YarnClusterManager getInstance(boolean registerShutdownHook)
YarnClusterManager
.registerShutdownHook
- if true register shutdown hookpublic YarnCluster getCluster(ClusterInfo clusterInfo)
clusterInfo
- the info about the clusterpublic boolean closeCluster(YarnCluster cluster)
YarnCluster
from
a manager cache.cluster
- the Yarn clusterpublic void close()
public void registerShutdownHook()
protected void doClose()