Package org.apache.bookkeeper.proto

Examples of org.apache.bookkeeper.proto.BookieClient.readEntry()


            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(2, arc.entry.getInt());
        }
        synchronized(arc) {
            bc.readEntry(1, 3, recb, arc);
            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(3, arc.entry.getInt());
        }
        synchronized(arc) {
View Full Code Here


            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(3, arc.entry.getInt());
        }
        synchronized(arc) {
            bc.readEntry(1, 4, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
        synchronized(arc) {
            bc.readEntry(1, 11, recb, arc);
View Full Code Here

            bc.readEntry(1, 4, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
        synchronized(arc) {
            bc.readEntry(1, 11, recb, arc);
            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(11, arc.entry.getInt());
        }
        synchronized(arc) {
View Full Code Here

            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(11, arc.entry.getInt());
        }
        synchronized(arc) {
            bc.readEntry(1, 5, recb, arc);
            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(5, arc.entry.getInt());
        }
        synchronized(arc) {
View Full Code Here

            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(5, arc.entry.getInt());
        }
        synchronized(arc) {
            bc.readEntry(1, 10, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
        synchronized(arc) {
            bc.readEntry(1, 12, recb, arc);
View Full Code Here

            bc.readEntry(1, 10, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
        synchronized(arc) {
            bc.readEntry(1, 12, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
        synchronized(arc) {
            bc.readEntry(1, 13, recb, arc);
View Full Code Here

            bc.readEntry(1, 12, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
        synchronized(arc) {
            bc.readEntry(1, 13, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOENTRY, arc.rc);
        }
    }
    private ByteBuffer createByteBuffer(int i) {
View Full Code Here

    @Test
    public void testNoLedger() throws Exception {
        ResultStruct arc = new ResultStruct();
        BookieClient bc = new BookieClient("127.0.0.1", port, 50000);
        synchronized(arc) {
            bc.readEntry(2, 13, recb, arc);
            arc.wait(1000);
            assertEquals(BookieProtocol.ENOLEDGER, arc.rc);
        }
    }
}
View Full Code Here

       
        for(InetSocketAddress s : bookies){
            LOG.info(s);
            BookieClient client = new BookieClient(s, 3000);
            clients.add(client);
            client.readEntry(lId,
                    -1,
                    this,
                    null);
        }       
       
View Full Code Here

        BookieClient bc = new BookieClient(channelFactory, executor);
        ChannelBuffer bb;
        bb = createByteBuffer(1, 1, 1);
        bc.addEntry(addr, 1, passwd, 1, bb, wrcb, null);
        synchronized (arc) {
            bc.readEntry(addr, 1, 1, recb, arc);
            arc.wait(1000);
            assertEquals(0, arc.rc);
            assertEquals(1, arc.entry.getInt());
        }
        bb = createByteBuffer(2, 1, 2);
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.