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

Examples of org.apache.hadoop.hdfs.server.namenode.SnapshotNode.createSnapshot()


   
    // Move foo to waiting room.
    assertTrue(wr.moveToWaitingRoom(foo));
   
    // Create snapshot
    ssNode.createSnapshot("first", false); // contains nothing

    // Create bar (V1)
    stream = fs.create(bar);
    stream.write(0);
    stream.close();
View Full Code Here


    // Create mash (empty)
    stream = fs.create(mash);
    stream.close();

    // Create snapshot
    ssNode.createSnapshot("second", false); // contains bar (V1), mash

    // Move mash, bar to waiting room
    assertTrue(wr.moveToWaitingRoom(mash));
    assertTrue(wr.moveToWaitingRoom(bar));
View Full Code Here

    // Create bar (V2)
    stream = fs.create(bar);
    stream.write(0);
    stream.close();

    ssNode.createSnapshot("third", false); // contains bar (V2)

    // Verify fs state right now
    assertTrue(fs.exists(bar));
    assertFalse(fs.exists(foo));
    assertFalse(fs.exists(mash));
View Full Code Here

    // Keep bar as file under instruction
    out = dfs.create(bar);
    out.writeBytes("bar");
    out.sync(); // sync to flush stream buffer to NN

    ssNode.createSnapshot("leaseNotUpdated_V1", false);
    ssNode.createSnapshot("leaseUpdated_V1", true);

    out.writeBytes("bar");
    out.close();
View Full Code Here

    out = dfs.create(bar);
    out.writeBytes("bar");
    out.sync(); // sync to flush stream buffer to NN

    ssNode.createSnapshot("leaseNotUpdated_V1", false);
    ssNode.createSnapshot("leaseUpdated_V1", true);

    out.writeBytes("bar");
    out.close();

    dfs.delete(foo);
View Full Code Here

    out.writeBytes("bar");
    out.close();

    dfs.delete(foo);
    System.out.println("WOOT");
    ssNode.createSnapshot("leaseNotUpdated_V2", false);
    ssNode.createSnapshot("leaseUpdated_V2", true);

    // Shutdown ssNode
    ssNode.shutdown();
View Full Code Here

    out.close();

    dfs.delete(foo);
    System.out.println("WOOT");
    ssNode.createSnapshot("leaseNotUpdated_V2", false);
    ssNode.createSnapshot("leaseUpdated_V2", true);

    // Shutdown ssNode
    ssNode.shutdown();

    INodeFile file;
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.