Example usage for Java org.apache.hadoop.hdfs MiniDFSCluster fields, constructors, methods, implement or subclass
The text is from its open source code.
String | PROP_TEST_BUILD_DATA System property to set the data dir: |
String | HDFS_MINIDFS_BASEDIR Configuration option to set the data dir: |
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. |
Configuration | getConfiguration(int nnIndex) |
DistributedFileSystem | getFileSystem() Get a client handle to the DFS cluster with a single namenode. |
NameNode | getNameNode() Gets the started NameNode. |
int | getNameNodePort() Gets the rpc port used by the NameNode, because the caller supplied port is not necessarily the actual port used. |
URI | getURI() |
void | setLeasePeriod(long soft, long hard) Set the softLimit and hardLimit of client lease periods |
void | shutdown() Shutdown all the nodes in the cluster. |
void | shutdown(boolean deleteDfsDir) Shutdown all the nodes in the cluster. |
void | shutdownCluster(MiniDFSCluster cluster) Shut down a cluster if it is not null |
void | startDataNodes(Configuration conf, int numDataNodes, boolean manageDfsDirs, StartupOption operation, String[] racks) Modify the config and start up the DataNodes. |
DataNodeProperties | stopDataNode(int i) |
DataNodeProperties | stopDataNode(String dnName) |
void | waitActive() Wait until the cluster is active and running. |
void | waitClusterUp() wait for the cluster to get out of safemode. |