List of usage examples for org.apache.hadoop.hdfs.server.namenode NameNode join
public void join()
From source file:com.mellanox.r4h.MiniDFSCluster.java
License:Apache License
/** * Shutdown all the nodes in the cluster. *//*from w w w .j a v a 2s. c om*/ public void shutdown(boolean deleteDfsDir) { LOG.info("Shutting down the Mini HDFS Cluster"); if (checkExitOnShutdown) { if (ExitUtil.terminateCalled()) { LOG.fatal("Test resulted in an unexpected exit", ExitUtil.getFirstExitException()); ExitUtil.resetFirstExitException(); throw new AssertionError("Test resulted in an unexpected exit"); } } shutdownDataNodes(); for (NameNodeInfo nnInfo : nameNodes) { if (nnInfo == null) continue; NameNode nameNode = nnInfo.nameNode; if (nameNode != null) { nameNode.stop(); nameNode.join(); nameNode = null; } } if (deleteDfsDir) { base_dir.delete(); } else { base_dir.deleteOnExit(); } }
From source file:com.mellanox.r4h.MiniDFSCluster.java
License:Apache License
/** * Shutdown the namenode at a given index. */// w w w . j a v a2 s . c om public synchronized void shutdownNameNode(int nnIndex) { NameNode nn = nameNodes[nnIndex].nameNode; if (nn != null) { LOG.info("Shutting down the namenode"); nn.stop(); nn.join(); Configuration conf = nameNodes[nnIndex].conf; nameNodes[nnIndex] = new NameNodeInfo(null, null, null, null, conf); } }