Examples of WaitingRoom


Examples of org.apache.hadoop.hdfs.server.namenode.WaitingRoom

    }

    maxLeaseUpdateThreads = conf.getInt("fs.snapshot.leaseupdatethreads", 100);

    // Waiting room purge thread
    purgeThread = new Daemon((new WaitingRoom(conf)).getPurger());
    purgeThread.start();

    // Get namenode rpc connection
    nameNodeAddr = NameNode.getAddress(conf);
    namenode = (NamenodeProtocol) RPC.waitForProxy(NamenodeProtocol.class,
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.WaitingRoom

    }

    maxLeaseUpdateThreads = conf.getInt("fs.snapshot.leaseupdatethreads", 100);

    // Waiting room purge thread
    purgeThread = new Daemon((new WaitingRoom(conf)).getPurger());
    purgeThread.start();

    // Get namenode rpc connection
    nameNodeAddr = NameNode.getAddress(conf);
    namenode = (NamenodeProtocol) RPC.waitForProxy(NamenodeProtocol.class,
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.WaitingRoom

    Configuration conf = new Configuration();
    MiniDFSCluster cluster = new MiniDFSCluster(conf, 1, true, null);
    cluster.waitClusterUp();
    FileSystem fs = cluster.getFileSystem();

    WaitingRoom wr = new WaitingRoom(conf);
    WaitingRoomPurger purger = wr.getPurger();
    SnapshotNode ssNode = new SnapshotNode(conf);
    ssNode.shutdownWaitingRoomPurger();

    String wrPath = conf.get("fs.snapshot.waitingroom", "/.WR");   
    String ssDir = conf.get("fs.snapshot.dir", "/.SNAPSHOT");

    Path foo = new Path("/foo");
    Path bar = new Path("/hadoop/bar");
    Path mash = new Path("/hadoop/mash");

    FSDataOutputStream stream;

    // Create foo
    stream = fs.create(foo);
    stream.writeByte(0);
    stream.close();
   
    // 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();

    // 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));

    // Create bar (V2)
    stream = fs.create(bar);
    stream.write(0);
    stream.close();
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.