public class StandaloneHadoopCluster extends java.lang.Object implements HadoopCluster
| Constructor and Description |
|---|
StandaloneHadoopCluster(java.lang.String clusterName)
Instantiates a mini cluster with default
cluster node count.
|
StandaloneHadoopCluster(java.lang.String clusterName,
int nodes)
Instantiates a mini cluster with given
cluster node count.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the
Configuration for the cluster. |
org.apache.hadoop.fs.FileSystem |
getFileSystem()
Gets the configured
FileSystem managed
by HadoopCluster. |
void |
setNodes(int nodes)
Sets a number of nodes for cluster.
|
void |
start()
Starts the cluster.
|
void |
stop()
Stops the cluster.
|
public StandaloneHadoopCluster(java.lang.String clusterName)
clusterName - the unique cluster namepublic StandaloneHadoopCluster(java.lang.String clusterName,
int nodes)
clusterName - the unique cluster namenodes - the node countpublic org.apache.hadoop.conf.Configuration getConfiguration()
HadoopClusterConfiguration for the cluster.
As most of the configuration parameters are not
known until after cluster has been started, this
configuration should be configured by the
cluster itself.getConfiguration in interface HadoopClusterConfigurationpublic void start()
throws java.io.IOException
HadoopClusterstart in interface HadoopClusterjava.io.IOExceptionpublic void stop()
HadoopClusterstop in interface HadoopClusterpublic org.apache.hadoop.fs.FileSystem getFileSystem()
throws java.io.IOException
HadoopClusterFileSystem managed
by HadoopCluster.getFileSystem in interface HadoopClusterjava.io.IOException - if error occuredpublic void setNodes(int nodes)
nodes - the number of nodes