Examples of disableLedgerReplication()


Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

            for (int j = 0; j < 100; j++) {
                lh.addEntry("testdata".getBytes());
            }
            lh.close();
        }
        underReplicationManager.disableLedgerReplication();

        final AtomicInteger numReads = new AtomicInteger(0);
        ServerConfiguration conf = killBookie(0);

        Bookie deadBookie = new Bookie(conf) {
View Full Code Here

Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

        Thread.sleep(CHECK_INTERVAL * 2);
        assertEquals("Nothing should have tried to read", 0, numReads.get());
        underReplicationManager.enableLedgerReplication();
        Thread.sleep(CHECK_INTERVAL * 2); // give it time to run

        underReplicationManager.disableLedgerReplication();
        // give it time to stop, from this point nothing new should be marked
        Thread.sleep(CHECK_INTERVAL * 2);

        int numUnderreplicated = 0;
        long underReplicatedLedger = -1;
View Full Code Here

Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

                } else {
                    if (!underreplicationManager.isLedgerReplicationEnabled()) {
                        LOG.warn("Autorecovery already disabled. Doing nothing");
                    } else {
                        LOG.info("Disabling autorecovery");
                        underreplicationManager.disableLedgerReplication();
                    }
                }
            } finally {
                if (zk != null) {
                    zk.close();
View Full Code Here

Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

            for (int j = 0; j < 100; j++) {
                lh.addEntry("testdata".getBytes());
            }
            lh.close();
        }
        underReplicationManager.disableLedgerReplication();

        final AtomicInteger numReads = new AtomicInteger(0);
        ServerConfiguration conf = killBookie(0);

        Bookie deadBookie = new Bookie(conf) {
View Full Code Here

Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

        Thread.sleep(CHECK_INTERVAL * 2);
        assertEquals("Nothing should have tried to read", 0, numReads.get());
        underReplicationManager.enableLedgerReplication();
        Thread.sleep(CHECK_INTERVAL * 2); // give it time to run

        underReplicationManager.disableLedgerReplication();
        // give it time to stop, from this point nothing new should be marked
        Thread.sleep(CHECK_INTERVAL * 2);

        int numUnderreplicated = 0;
        long underReplicatedLedger = -1;
View Full Code Here

Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

                } else {
                    if (!underreplicationManager.isLedgerReplicationEnabled()) {
                        LOG.warn("Autorecovery already disabled. Doing nothing");
                    } else {
                        LOG.info("Disabling autorecovery");
                        underreplicationManager.disableLedgerReplication();
                    }
                }
            } finally {
                if (zk != null) {
                    zk.close();
View Full Code Here

Examples of org.apache.bookkeeper.meta.LedgerUnderreplicationManager.disableLedgerReplication()

     */
    @Test(timeout=30000)
    public void testEntryLogCorruption() throws Exception {
        LedgerManagerFactory mFactory = LedgerManagerFactory.newLedgerManagerFactory(bsConfs.get(0), zkc);
        LedgerUnderreplicationManager underReplicationManager = mFactory.newLedgerUnderreplicationManager();
        underReplicationManager.disableLedgerReplication();

        LedgerHandle lh = bkc.createLedger(3, 3, DigestType.CRC32, "passwd".getBytes());
        long ledgerId = lh.getId();
        for (int i = 0; i < 100; i++) {
            lh.addEntry("testdata".getBytes());
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.