List of usage examples for org.apache.hadoop.hdfs.tools DFSAdmin DFSAdmin
public DFSAdmin(Configuration conf)
From source file:com.mellanox.r4h.MiniDFSCluster.java
License:Apache License
/** * Finalize the namenode. Block pools corresponding to the namenode are * finalized on the datanode.//from w ww . j a v a2 s . c om */ private void finalizeNamenode(NameNode nn, Configuration conf) throws Exception { if (nn == null) { throw new IllegalStateException("Attempting to finalize " + "Namenode but it is not running"); } ToolRunner.run(new DFSAdmin(conf), new String[] { "-finalizeUpgrade" }); }