Example usage for org.apache.hadoop.hdfs.tools DFSAdmin DFSAdmin

List of usage examples for org.apache.hadoop.hdfs.tools DFSAdmin DFSAdmin

Introduction

In this page you can find the example usage for org.apache.hadoop.hdfs.tools DFSAdmin DFSAdmin.

Prototype

public DFSAdmin(Configuration conf) 

Source Link

Document

Construct a DFSAdmin object.

Usage

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" });
}