Package org.apache.hadoop.hdfs.server.namenode

Examples of org.apache.hadoop.hdfs.server.namenode.NameNode.abandonBlock()


    NameNode nn = cluster.getNameNode();
    String clientName = ((DistributedFileSystem) fs).getClient().clientName;
    fs.create(new Path(src));
    for (int i = 0; i < 10; i++) {
      Block b = nn.addBlock(src, clientName).getBlock();
      nn.abandonBlock(b, src, clientName);
    }
    fs.create(new Path(src1));
    nn.addBlock(src1, clientName);
    cluster.restartNameNode(0, new String[] {}, false);
    nn = cluster.getNameNode();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.