Package voldemort.utils.ConsistencyFix

Examples of voldemort.utils.ConsistencyFix.BadKeyStatus


    }

    @Test
    public void testBadKeyResult() {
        BadKey badKey = new BadKey("0101", "0101\n");
        ConsistencyFix.BadKeyStatus bkr1 = new BadKeyStatus(badKey, ConsistencyFix.Status.SUCCESS);
        assertFalse(bkr1.isPoison());
        assertEquals(bkr1.getBadKey().getKeyInHexFormat(), "0101");
        assertEquals(bkr1.getBadKey().getReaderInput(), "0101\n");
        assertEquals(bkr1.getStatus(), ConsistencyFix.Status.SUCCESS);

        ConsistencyFix.BadKeyStatus bkr2 = new BadKeyStatus();
        assertTrue(bkr2.isPoison());
        assertEquals(bkr2.getBadKey(), null);
        assertEquals(bkr2.getStatus(), null);
    }
View Full Code Here


        // Enqueue stuff for bad key writer to write
        try {
            for(int i = 0; i < 100; ++i) {
                BadKey badKey = new BadKey(Integer.toHexString(i), Integer.toHexString(i) + "\n");

                bq.put(new BadKeyStatus(badKey, ConsistencyFix.Status.REPAIR_EXCEPTION));
            }
            // Poison bad key writer
            bq.put(new BadKeyStatus());
        } catch(InterruptedException e) {
            e.printStackTrace();
            fail("Unexpected exception");
        }
View Full Code Here

        logger.trace("Finished processing key " + badKey + " (" + myName() + ")");
        consistencyFix.getStats().incrementFixCount();

        if(status != Status.SUCCESS) {
            try {
                badKeyQOut.put(new BadKeyStatus(badKey, status));
            } catch(InterruptedException ie) {
                logger.warn("Worker thread " + myName() + " interrupted.");
            }
            consistencyFix.getStats().incrementFailures(status);
        }
View Full Code Here

TOP

Related Classes of voldemort.utils.ConsistencyFix.BadKeyStatus

Copyright © 2018 www.massapicom. 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.