Java org.apache.hadoop.hdfs MiniDFSCluster fields, constructors, methods, implement or subclass

Example usage for Java org.apache.hadoop.hdfs MiniDFSCluster fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.hadoop.hdfs MiniDFSCluster.

The text is from its open source code.

Field

StringPROP_TEST_BUILD_DATA
System property to set the data dir:
StringHDFS_MINIDFS_BASEDIR
Configuration option to set the data dir:

Constructor

MiniDFSCluster(Configuration conf, int numDataNodes, boolean format, String[] racks)
Modify the config and start up the servers.
MiniDFSCluster(int nameNodePort, Configuration conf, int numDataNodes, boolean format, boolean manageDfsDirs, StartupOption operation, String[] racks)
NOTE: if possible, the other constructors that don't have nameNode port parameter should be used as they will ensure that the servers use free ports.
MiniDFSCluster(Configuration conf, int numDataNodes, boolean format, String[] racks, String[] hosts)
Modify the config and start up the servers.
MiniDFSCluster(int nameNodePort, Configuration conf, int numDataNodes, boolean format, boolean manageNameDfsDirs, boolean manageDataDfsDirs, StartupOption operation, String[] racks, String hosts[], long[] simulatedCapacities)
NOTE: if possible, the other constructors that don't have nameNode port parameter should be used as they will ensure that the servers use free ports.

Method

ConfigurationgetConfiguration(int nnIndex)
DistributedFileSystemgetFileSystem()
Get a client handle to the DFS cluster with a single namenode.
NameNodegetNameNode()
Gets the started NameNode.
intgetNameNodePort()
Gets the rpc port used by the NameNode, because the caller supplied port is not necessarily the actual port used.
URIgetURI()
voidsetLeasePeriod(long soft, long hard)
Set the softLimit and hardLimit of client lease periods
voidshutdown()
Shutdown all the nodes in the cluster.
voidshutdown(boolean deleteDfsDir)
Shutdown all the nodes in the cluster.
voidshutdownCluster(MiniDFSCluster cluster)
Shut down a cluster if it is not null
voidstartDataNodes(Configuration conf, int numDataNodes, boolean manageDfsDirs, StartupOption operation, String[] racks)
Modify the config and start up the DataNodes.
DataNodePropertiesstopDataNode(int i)
DataNodePropertiesstopDataNode(String dnName)
voidwaitActive()
Wait until the cluster is active and running.
voidwaitClusterUp()
wait for the cluster to get out of safemode.